public abstract class HttpUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET |
| Constructor and Description |
|---|
HttpUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildUrlParams(String url,
Map<String,String> params) |
static String |
executeRequest(org.apache.http.client.methods.HttpRequestBase request,
String charset,
int timeout) |
static String |
getUrl(String domain,
String path) |
static String |
parseMapToHttpParameters(Map<String,String> parameters) |
static List<org.apache.http.NameValuePair> |
parseMapToPairs(Map<String,String> parameters) |
static String |
post(String postUrl,
org.apache.http.HttpEntity reqEntity,
String charset,
int timeout) |
static String |
post(String postUrl,
String content,
String charset,
int timeout) |
static String |
readResponse(org.apache.http.HttpResponse response,
String charset) |
public static final String DEFAULT_CHARSET
public static String executeRequest(org.apache.http.client.methods.HttpRequestBase request, String charset, int timeout)
request - public static String readResponse(org.apache.http.HttpResponse response, String charset) throws IOException
IOExceptionpublic static String post(String postUrl, org.apache.http.HttpEntity reqEntity, String charset, int timeout)
postUrl - reqEntity - public static String parseMapToHttpParameters(Map<String,String> parameters)
Copyright © 2018. All rights reserved.