HttpClient that also implements Closeable.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static HttpHost | |
| protected abstract CloseableHttpResponse | |
| public CloseableHttpResponse | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public CloseableHttpResponse | execute(final HttpUriRequest
the request to execute request, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public CloseableHttpResponse | execute(final HttpUriRequest
the request to execute request)Implements org. |
| public CloseableHttpResponse | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request)Implements org. |
| public <T> T | Returns: the response object as generated by the response handler.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler)Implements org. |
| public <T> T | Returns: the response object as generated by the response handler.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public <T> T | Returns: the response object as generated by the response handler.the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler)Implements org. |
| public <T> T | Returns: the response object as generated by the response handler.the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| log | back to summary |
|---|---|
| private final Log log | |
| CloseableHttpClient | back to summary |
|---|---|
| public CloseableHttpClient() | |
| determineTarget | back to summary |
|---|---|
| private static HttpHost determineTarget(final HttpUriRequest request) throws ClientProtocolException | |
| doExecute | back to summary |
|---|---|
| protected abstract CloseableHttpResponse doExecute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException | |
| execute | back to summary |
|---|---|
| public CloseableHttpResponse execute(final HttpHost target, final HttpRequest request, final HttpContext context) throws IOException, ClientProtocolException Implements org. Doc from org. Executes HTTP request using the given context.
| |
| execute | back to summary |
|---|---|
| public CloseableHttpResponse execute(final HttpUriRequest request, final HttpContext context) throws IOException, ClientProtocolException Implements org. Doc from org. Executes HTTP request using the given context.
| |
| execute | back to summary |
|---|---|
| public CloseableHttpResponse execute(final HttpUriRequest request) throws IOException, ClientProtocolException Implements org. Doc from org. Executes HTTP request using the default context.
| |
| execute | back to summary |
|---|---|
| public CloseableHttpResponse execute(final HttpHost target, final HttpRequest request) throws IOException, ClientProtocolException Implements org. Doc from org. Executes HTTP request using the default context.
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException Implements org. Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler, final HttpContext context) throws IOException, ClientProtocolException Implements org. Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpHost target, final HttpRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException Implements org. Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpHost target, final HttpRequest request, final ResponseHandler<? extends T> responseHandler, final HttpContext context) throws IOException, ClientProtocolException Implements org. Executes a request using the default context and processes the
response using the given response handler. The content entity associated
with the response is fully consumed and the underlying connection is
released back to the connection manager automatically in all cases
relieving individual
| |