public class HttpClientUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
HttpClientUtil.HttpDeleteWithBody |
| 构造器和说明 |
|---|
HttpClientUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
closeResponse(org.apache.http.client.methods.CloseableHttpResponse closeableHttpResponse) |
static String |
delete(com.alibaba.fastjson.JSONObject headers,
String url,
com.alibaba.fastjson.JSONObject params)
delete,params可为null,headers可为null
|
static String |
get(com.alibaba.fastjson.JSONObject headers,
String url,
com.alibaba.fastjson.JSONObject params)
get请求,params可为null,headers可为null
|
static org.apache.http.impl.client.CloseableHttpClient |
getHttpClient() |
static String |
post(com.alibaba.fastjson.JSONObject headers,
String url,
com.alibaba.fastjson.JSONObject params)
post请求,params可为null,headers可为null
|
static String |
put(com.alibaba.fastjson.JSONObject headers,
String url,
com.alibaba.fastjson.JSONObject params)
put,params可为null,headers可为null
|
public static org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public static void closeResponse(org.apache.http.client.methods.CloseableHttpResponse closeableHttpResponse)
throws IOException
IOExceptionpublic static String get(com.alibaba.fastjson.JSONObject headers, String url, com.alibaba.fastjson.JSONObject params)
headers - url - IOExceptionpublic static String post(com.alibaba.fastjson.JSONObject headers, String url, com.alibaba.fastjson.JSONObject params)
headers - url - params - IOExceptionpublic static String delete(com.alibaba.fastjson.JSONObject headers, String url, com.alibaba.fastjson.JSONObject params)
url - params - IOExceptionpublic static String put(com.alibaba.fastjson.JSONObject headers, String url, com.alibaba.fastjson.JSONObject params)
url - params - IOExceptionCopyright © 2023. All Rights Reserved.