public class HttpClientExecutor extends Object implements HttpExecutor
logger| 构造器和说明 |
|---|
HttpClientExecutor() |
HttpClientExecutor(org.apache.http.impl.client.HttpClientBuilder builder) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected org.apache.http.impl.client.HttpClientBuilder |
defaultHttpClientBuilder()
默认的HttpClientBuilder
|
void |
doExecute(Request request,
ResponseProcessor processor)
执行http请求
|
protected void |
doHeaderSetting(org.apache.http.client.methods.HttpRequestBase httpRequestBase,
Request request)
设置请求头信息
|
protected void |
httpRequestSetting(org.apache.http.client.methods.HttpRequestBase httpRequestBase,
Request request) |
protected void |
resultProcess(Request request,
ResponseProcessor processor,
org.apache.http.client.methods.CloseableHttpResponse response)
响应结果处理
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, connectForBytes, connectForConfigMap, connectForConfigMapList, connectForEntity, connectForEntity, connectForEntity, connectForInputStream, connectForInputStreamSource, connectForMap, connectForMapList, connectForMultipartFile, connectForString, delete, deleteForBytes, deleteForConfigMap, deleteForConfigMapList, deleteForEntity, deleteForEntity, deleteForEntity, deleteForInputStream, deleteForInputStreamSource, deleteForMap, deleteForMapList, deleteForMultipartFile, deleteForString, execute, execute, execute, get, getBytes, getConfigMap, getConfigMapList, getEntity, getEntity, getEntity, getForBytes, getForConfigMap, getForConfigMapList, getForEntity, getForEntity, getForEntity, getForInputStream, getForInputStreamSource, getForMap, getForMapList, getForMultipartFile, getForString, getInputStream, getInputStreamSource, getMap, getMapList, getMultipartFile, getString, head, headForBytes, headForConfigMap, headForConfigMapList, headForEntity, headForEntity, headForEntity, headForInputStream, headForInputStreamSource, headForMap, headForMapList, headForMultipartFile, headForString, isFileRequest, isResourceParam, isResourceParam, options, optionsForBytes, optionsForConfigMap, optionsForConfigMapList, optionsForEntity, optionsForEntity, optionsForEntity, optionsForInputStream, optionsForInputStreamSource, optionsForMap, optionsForMapList, optionsForMultipartFile, optionsForString, patch, patchForBytes, patchForConfigMap, patchForConfigMapList, patchForEntity, patchForEntity, patchForEntity, patchForInputStream, patchForInputStreamSource, patchForMap, patchForMapList, patchForMultipartFile, patchForString, post, postForBytes, postForConfigMap, postForConfigMapList, postForEntity, postForEntity, postForEntity, postForInputStream, postForInputStreamSource, postForMap, postForMapList, postForMultipartFile, postForString, put, putForBytes, putForConfigMap, putForConfigMapList, putForEntity, putForEntity, putForEntity, putForInputStream, putForInputStreamSource, putForMap, putForMapList, putForMultipartFile, putForString, toHttpFile, toHttpFiles, trace, traceForBytes, traceForConfigMap, traceForConfigMapList, traceForEntity, traceForEntity, traceForEntity, traceForInputStream, traceForInputStreamSource, traceForMap, traceForMapList, traceForMultipartFile, traceForStringpublic HttpClientExecutor(org.apache.http.impl.client.HttpClientBuilder builder)
public HttpClientExecutor()
public void doExecute(Request request, ResponseProcessor processor) throws Exception
HttpExecutordoExecute 在接口中 HttpExecutorrequest - 请求实例processor - 响应处理器Exceptionprotected void httpRequestSetting(org.apache.http.client.methods.HttpRequestBase httpRequestBase,
Request request)
protected void doHeaderSetting(org.apache.http.client.methods.HttpRequestBase httpRequestBase,
Request request)
httpRequestBase - Http Client需要的的请求request - 请求信息protected org.apache.http.impl.client.HttpClientBuilder defaultHttpClientBuilder()
protected void resultProcess(Request request, ResponseProcessor processor, org.apache.http.client.methods.CloseableHttpResponse response)
request - 请求实例processor - 响应处理器response - Apache HttpClient的CloseableHttpResponseCopyright © 2023. All rights reserved.