See: Description
| Class | Description |
|---|---|
| AbstractHttpClientResponseHandler<T> |
A generic
HttpClientResponseHandler that works with the response entity
for successful (2xx) responses. |
| AIMDBackoffManager |
The
AIMDBackoffManager applies an additive increase,
multiplicative decrease (AIMD) to managing a dynamic limit to
the number of connections allowed to a given host. |
| BasicHttpClientResponseHandler |
A
HttpClientResponseHandler that returns
the response body as a String for successful (2xx) responses. |
| ClassicRequestCopier | |
| CloseableHttpClient |
Base implementation of
HttpClient that also implements Closeable. |
| CloseableHttpResponse |
Backward compatibility with HttpClient 4.x.
|
| ConnectExec |
Request executor in the HTTP request execution chain
that is responsible for establishing connection to the target
origin server as specified by the current route.
|
| ContentCompressionExec |
Request executor in the request execution chain that is responsible
for automatic response content decompression.
|
| DefaultBackoffStrategy |
This
ConnectionBackoffStrategy backs off either for a raw
network socket or connection timeout or if the server explicitly
sends a 503 (Service Unavailable) response. |
| FutureRequestExecutionMetrics |
Collection of different counters used to gather metrics for
FutureRequestExecutionService. |
| FutureRequestExecutionService |
HttpAsyncClientWithFuture wraps calls to execute with a
HttpRequestFutureTask
and schedules them using the provided executor service. |
| HttpClientBuilder |
Builder for
CloseableHttpClient instances. |
| HttpClients |
Factory methods for
CloseableHttpClient instances. |
| HttpRequestFutureTask<V> |
FutureTask implementation that wraps a HttpAsyncClientCallable and exposes various task
specific metrics.
|
| MinimalHttpClient |
Internal class.
|
| NullBackoffStrategy |
This is a
ConnectionBackoffStrategy that never backs off,
for compatibility with existing behavior. |
| ProxyClient |
ProxyClient can be used to establish a tunnel via an HTTP proxy.
|
| Exception | Description |
|---|---|
| RequestAbortedException |
Signals that the request has been aborted.
|
| RequestFailedException |
Signals that the request has been aborted or failed due to an expected condition.
|
The usual execution flow can be demonstrated by the code snippet below:
CloseableHttpClient httpclient = HttpClients.createDefault();
try {
HttpGet httpGet = new HttpGet("http://targethost/homepage");
CloseableHttpResponse response = httpclient.execute(httpGet);
try {
System.out.println(response.getStatusLine());
HttpEntity entity = response.getEntity();
// do something useful with the response body
// and ensure it is fully consumed
EntityUtils.consume(entity);
} finally {
response.close();
}
} finally {
httpclient.close();
}
Copyright © 1999–2018 The Apache Software Foundation. All rights reserved.