- java.lang.Object
-
- develop.toolkit.base.utils.HttpAdvice
-
public final class HttpAdvice extends Object
Http增强工具
-
-
构造器概要
构造器 构造器 说明 HttpAdvice()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static HttpClientdefaultHttpClient()默认的httpClientstatic HttpAdviceResponsedelete(String label, HttpClient httpClient, String url, Map<String,String> headers, String content)static HttpAdviceResponseget(String label, HttpClient httpClient, String url, Map<String,String> headers, Map<String,Object> parameters)GET请求static HttpAdviceResponsepost(String label, HttpClient httpClient, String url, Map<String,String> headers, String content)static HttpAdviceResponseput(String label, HttpClient httpClient, String url, Map<String,String> headers, String content)static HttpAdviceResponserequest(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String content)通用请求static HttpAdviceResponsesendFormUrlencoded(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, Map<String,String> form)发送x-www-form-urlencoded格式请求static HttpAdviceResponsesendJson(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String json)发送json请求static HttpAdviceResponsesendXml(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String xml)发送xml请求
-
-
-
方法详细资料
-
defaultHttpClient
public static HttpClient defaultHttpClient()
默认的httpClient
-
request
public static HttpAdviceResponse request(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String content) throws IOException
通用请求- 抛出:
IOException
-
get
public static HttpAdviceResponse get(String label, HttpClient httpClient, String url, Map<String,String> headers, Map<String,Object> parameters) throws IOException
GET请求- 抛出:
IOException
-
post
public static HttpAdviceResponse post(String label, HttpClient httpClient, String url, Map<String,String> headers, String content) throws IOException
- 抛出:
IOException
-
put
public static HttpAdviceResponse put(String label, HttpClient httpClient, String url, Map<String,String> headers, String content) throws IOException
- 抛出:
IOException
-
delete
public static HttpAdviceResponse delete(String label, HttpClient httpClient, String url, Map<String,String> headers, String content) throws IOException
- 抛出:
IOException
-
sendFormUrlencoded
public static HttpAdviceResponse sendFormUrlencoded(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, Map<String,String> form) throws IOException
发送x-www-form-urlencoded格式请求- 抛出:
IOException
-
sendJson
public static HttpAdviceResponse sendJson(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String json) throws IOException
发送json请求- 抛出:
IOException
-
sendXml
public static HttpAdviceResponse sendXml(String label, HttpClient httpClient, String httpMethod, String url, Map<String,String> headers, Map<String,Object> parameters, String xml) throws IOException
发送xml请求- 抛出:
IOException
-
-