public interface HttpExecutor
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CONTENT_TYPE |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpResponse |
execute(Request request,
BodyType bodyType,
ResponseType responseType)
执行http请求
|
Charset |
getCharset()
获取请求编码
|
void |
setCharset(Charset charset)
设置请求编码
|
void |
setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
设置httpClient
|
void |
setProxy(org.apache.http.HttpHost proxy)
设置请求代理
|
void |
setTimeout(int socketTimeout,
int connectTimeout)
|
HttpResponse execute(Request request, BodyType bodyType, ResponseType responseType) throws HttpClientException, IOException
request - 请求信息bodyType - 请求体类型responseType - 响应体类型HttpClientExceptionIOExceptionvoid setCharset(Charset charset)
Charset getCharset()
void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
void setProxy(org.apache.http.HttpHost proxy)
void setTimeout(int socketTimeout,
int connectTimeout)
Copyright © 2019. All rights reserved.