public class HttpUtil extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | HttpUtil.HttpResponseClass used for holding response data | 
| Constructor and Description | 
|---|
| HttpUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static HttpUtil.HttpResponse | executeGet(String url,
          Map<String,String> headers)Execute an HTTP GET request to the given url, using the request headers as specified
 by the headers parameter. | 
| static HttpUtil.HttpResponse | executeGet(String url,
          String headerPrefix,
          Map<String,String> params)Execute an HTTP GET request to the given url. | 
| static HttpUtil.HttpResponse | executePost(String url,
           Map<String,String> headers,
           Map<String,String> formData,
           String charset)Execute an HTTP POST request to the given url, using the request headers as specified
 by the headers parameter. | 
| static HttpUtil.HttpResponse | executePost(String url,
           Map<String,String> headers,
           String postData,
           String mimeType,
           String charset)Execute an HTTP POST request to the given url, using the request headers as specified
 by the headers parameter. | 
| static HttpUtil.HttpResponse | executePost(String url,
           String headerPrefix,
           Map<String,String> params,
           Map<String,String> formData,
           String charset)Execute an HTTP POST request to the given url. | 
| static HttpUtil.HttpResponse | executePost(String url,
           String headerPrefix,
           Map<String,String> params,
           String postData,
           String mimeType,
           String charset)Execute an HTTP POST request to the given url. | 
| static String | getAbsoluteUrl(String baseUrlStr,
              String urlStr)Get the absolute url for the given urlStr, using the baseUrlStr if 
 the given urlStr contains a relative URL. | 
| static List<org.apache.http.NameValuePair> | getNameValuePairs(Map<String,String> data)Get a list of NameValuePair objects based on the entries contained in the given data map. | 
public static final String getAbsoluteUrl(String baseUrlStr, String urlStr) throws MalformedURLException
baseUrlStr - urlStr - MalformedURLExceptionpublic static final HttpUtil.HttpResponse executeGet(String url, Map<String,String> headers)
url - headers - public static final HttpUtil.HttpResponse executeGet(String url, String headerPrefix, Map<String,String> params)
url - headerPrefix - params - public static final HttpUtil.HttpResponse executePost(String url, Map<String,String> headers, String postData, String mimeType, String charset)
url - headers - postData - mimeType - charset - public static final HttpUtil.HttpResponse executePost(String url, String headerPrefix, Map<String,String> params, String postData, String mimeType, String charset)
url - headerPrefix - params - postData - mimeType - charset - public static final HttpUtil.HttpResponse executePost(String url, Map<String,String> headers, Map<String,String> formData, String charset) throws UnsupportedEncodingException
url - headers - formData - charset - UnsupportedEncodingExceptionpublic static final HttpUtil.HttpResponse executePost(String url, String headerPrefix, Map<String,String> params, Map<String,String> formData, String charset) throws UnsupportedEncodingException
url - headerPrefix - params - formData - charset - UnsupportedEncodingExceptionCopyright © 2013. All rights reserved.