| 程序包 | 说明 |
|---|---|
| cn.ziyicloud.framework.boot.util.httpclient | |
| cn.ziyicloud.framework.boot.util.httpclient.config |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
HttpClientUtil.delete(HttpConfig config)
以Delete方式,请求资源或服务
|
static OutputStream |
HttpClientUtil.down(HttpConfig config)
下载文件
|
static String |
HttpClientUtil.get(HttpConfig config)
以Get方式,请求资源或服务
|
static String |
HttpClientUtil.head(HttpConfig config)
以Head方式,请求资源或服务
|
static String |
HttpClientUtil.options(HttpConfig config)
以Options方式,请求资源或服务
|
static String |
HttpClientUtil.patch(HttpConfig config)
以Patch方式,请求资源或服务
|
static String |
HttpClientUtil.post(HttpConfig config)
以Post方式,请求资源或服务
|
static String |
HttpClientUtil.put(HttpConfig config)
以Put方式,请求资源或服务
|
static String |
HttpClientUtil.send(HttpConfig config)
请求资源或服务
|
static int |
HttpClientUtil.status(HttpConfig config)
查看资源链接情况,返回状态码
|
static String |
HttpClientUtil.trace(HttpConfig config)
以Trace方式,请求资源或服务
|
static String |
HttpClientUtil.upload(HttpConfig config)
上传文件
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpConfig |
HttpConfig.client(org.apache.http.client.HttpClient client) |
HttpConfig |
HttpConfig.context(org.apache.http.protocol.HttpContext context) |
static HttpConfig |
HttpConfig.custom()
获取实例
|
HttpConfig |
HttpConfig.encoding(String encoding) |
HttpConfig |
HttpConfig.file(String filePath) |
HttpConfig |
HttpConfig.files(String[] filePaths) |
HttpConfig |
HttpConfig.files(String[] filePaths,
String inputName)
上传文件时用到
|
HttpConfig |
HttpConfig.files(String[] filePaths,
String inputName,
boolean forceRemoveContentTypeChraset)
上传文件时用到
|
HttpConfig |
HttpConfig.headers(org.apache.http.Header[] headers) |
HttpConfig |
HttpConfig.headers(org.apache.http.Header[] headers,
boolean isReturnRespHeaders)
Header头信息(是否返回response中的headers)
|
HttpConfig |
HttpConfig.inenc(String inenc) |
HttpConfig |
HttpConfig.json(String json) |
HttpConfig |
HttpConfig.map(Map<String,Object> map) |
HttpConfig |
HttpConfig.method(HttpMethod method) |
HttpConfig |
HttpConfig.methodName(String methodName) |
HttpConfig |
HttpConfig.out(OutputStream out) |
HttpConfig |
HttpConfig.outenc(String outenc) |
HttpConfig |
HttpConfig.url(String url) |
Copyright © 2022. All rights reserved.