public final class HttpUtility
extends java.lang.Object
| Constructor and Description |
|---|
HttpUtility() |
| Modifier and Type | Method and Description |
|---|---|
static java.net.HttpURLConnection |
constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType)
construct the
HttpURLConnection object |
static java.net.HttpURLConnection |
constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType,
HttpURLConnectionSetter setter)
construct the
HttpURLConnection object |
static java.net.HttpURLConnection |
constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType,
int timeOutInSecond,
HttpURLConnectionSetter setter)
construct the
HttpURLConnection object |
static org.apache.http.client.methods.HttpRequestBase |
constructHttpRequest(java.net.URI uri,
HttpMethod method,
byte[] buffer,
java.lang.String contentType)
construct HttpRequestBase object based on apache HttpClient
|
public static java.net.HttpURLConnection constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType)
throws java.io.IOException
HttpURLConnection objecturl - specified URL objectmethod - HTTP methodbuffer - byte array which is needed to write to the request bodycontentType - Content-Type HTTP headerjava.io.IOException - HttpURLConnectionpublic static java.net.HttpURLConnection constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType,
HttpURLConnectionSetter setter)
throws java.io.IOException
HttpURLConnection objecturl - specified URL objectmethod - HTTP methodbuffer - byte array which is needed to write to the request bodycontentType - Content-Type HTTP headersetter - callback to set user defined properties to the
HttpURLConnection objectjava.io.IOException - HttpURLConnectionpublic static java.net.HttpURLConnection constructHttpConnection(java.net.URL url,
HttpMethod method,
byte[] buffer,
java.lang.String contentType,
int timeOutInSecond,
HttpURLConnectionSetter setter)
throws java.io.IOException
HttpURLConnection objecturl - specified URL objectmethod - HTTP methodbuffer - byte array which is needed to write to the request bodycontentType - Content-Type HTTP headertimeOutInSecond - HTTP(S) connection timeoutsetter - callback to set user defined properties to the
HttpURLConnection objectjava.io.IOException - HttpURLConnectionpublic static org.apache.http.client.methods.HttpRequestBase constructHttpRequest(java.net.URI uri,
HttpMethod method,
byte[] buffer,
java.lang.String contentType)
throws HawaiiException
url - specified URL objectmethod - HTTP methodbuffer - byte array which is needed to write to the request bodycontentType - Content-Type HTTP headerHawaiiException - HttpRequestBase