# Package org.apache.hc.client5.http.impl.sync

Default HTTP client implementation.

See: Description

Class Summary
Class | Description
--- | ---
AbstractResponseHandler<T> | A generic `ResponseHandler` 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.
BasicCredentialsProvider | Default implementation of `CredentialsStore`.
BasicResponseHandler | A `ResponseHandler` that returns the response body as a String for successful (2xx) responses.
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.
CookieSpecRegistries |
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.
DefaultHttpRequestRetryHandler | The default `HttpRequestRetryHandler` used by request executors.
DefaultServiceUnavailableRetryStrategy | Default implementation of the `ServiceUnavailableRetryStrategy` interface.
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.

Enum Summary
Enum | Description
--- | ---
ChainElements |

Exception Summary
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.
TunnelRefusedException | Signals that the tunnel request was rejected by the proxy host.

## Package org.apache.hc.client5.http.impl.sync Description

Default HTTP client implementation.

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();
     }