@Deprecated public class HttpClientUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpClientUtil.HttpClientUtilException
Deprecated.
异常
|
| Modifier and Type | Field and Description |
|---|---|
static int |
cache
Deprecated.
大概是缓冲区
|
static String |
CHARSET_UTF_8
Deprecated.
|
static String |
CONTENT_TYPE_FORM_URL
Deprecated.
|
static String |
CONTENT_TYPE_JSON_URL
Deprecated.
|
static String |
CONTENT_TYPE_TEXT_HTML
Deprecated.
|
| Constructor and Description |
|---|
HttpClientUtil()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
convertStringParamter(Map parameterMap)
Deprecated.
将map集合的键值对转化成:key1=value1&key2=value2 的形式
|
static String |
download(String url,
String filepath)
Deprecated.
根据url下载文件,保存到filepath中
|
static String |
get(String httpUrl)
Deprecated.
发送 get请求
|
static org.apache.http.impl.client.CloseableHttpClient |
getHttpClient()
Deprecated.
|
static String |
option(String httpUrl)
Deprecated.
发送option请求
|
static String |
post(String httpUrl)
Deprecated.
发送 post请求
|
static String |
post(String httpUrl,
Map<String,String> maps)
Deprecated.
发送 post请求
|
static String |
post(String httpUrl,
String params)
Deprecated.
发送 post请求
|
static String |
postJson(String httpUrl,
String paramsJson)
Deprecated.
发送 post请求 发送json数据
|
static String |
postXml(String httpUrl,
String paramsXml)
Deprecated.
发送 post请求 发送xml数据
|
public static final String CHARSET_UTF_8
public static final String CONTENT_TYPE_TEXT_HTML
public static final String CONTENT_TYPE_FORM_URL
public static final String CONTENT_TYPE_JSON_URL
public static int cache
public static org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public static String download(String url, String filepath)
url - filepath - public static String option(String httpUrl)
httpUrl - public static String post(String httpUrl, String params)
httpUrl - 地址params - 参数(格式:key1=value1&key2=value2)public static String post(String httpUrl, Map<String,String> maps)
maps - 参数public static String postJson(String httpUrl, String paramsJson)
httpUrl - 地址paramsJson - 参数(格式 json)public static String postXml(String httpUrl, String paramsXml)
httpUrl - 地址paramsXml - 参数(格式 Xml)Copyright © 2020. All rights reserved.