public class HttpUtil
extends java.lang.Object
| Constructor and Description |
|---|
HttpUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
createHttpConnection(java.lang.String type,
IMSessionMocImpl session,
java.lang.String data,
java.lang.String adress)
Method that will creat and return a new HTTPConnectio
|
static java.lang.String |
encode(java.lang.String value)
Make data encode
|
static java.lang.String |
get(IMSessionMocImpl session,
java.lang.String data,
java.lang.String adress)
Method responsable to create one POST HttpConnection
|
static java.lang.String |
post(IMSessionMocImpl session,
java.lang.String data,
java.lang.String adress)
Method responsable to create one GET HttpConnection
|
static java.lang.String |
receive(java.net.HttpURLConnection conn)
Read the response of one HTTPConnection
|
public static java.lang.String post(IMSessionMocImpl session, java.lang.String data, java.lang.String adress) throws IMException
session - data - adress - IMExceptionpublic static java.lang.String get(IMSessionMocImpl session, java.lang.String data, java.lang.String adress) throws IMException
session - data - adress - IMExceptionpublic static java.lang.String encode(java.lang.String value)
throws java.io.UnsupportedEncodingException
value - java.io.UnsupportedEncodingExceptionpublic static java.lang.String receive(java.net.HttpURLConnection conn)
throws java.io.IOException
conn - java.io.IOExceptionpublic static java.lang.String createHttpConnection(java.lang.String type,
IMSessionMocImpl session,
java.lang.String data,
java.lang.String adress)
throws IMException
type - the type of connection that will be createsession - IMI sessiondata - represents the message to sendadress - represents MOC service URLIMException