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

Default HTTP client implementation.

See: Description

Interface Summary
Interface | Description
--- | ---
ClientExecChain | This interface represents an element in the HTTP request execution chain.

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.
BackoffStrategyExec |
BasicCredentialsProvider | Default implementation of `CredentialsStore`.
CloseableHttpClient | Base implementation of `HttpClient` that also implements `Closeable`.
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.
IdleConnectionEvictor | This class maintains a background thread to enforce an eviction policy for expired / idle persistent connections kept alive in the connection pool.
MainClientExec | The last request executor in the HTTP request execution chain that is responsible for execution of request / response exchanges with the opposite endpoint.
MinimalClientExec | Request executor that implements the most fundamental aspects of the HTTP specification and the most straight-forward request / response exchange with the target server.
NoopUserTokenHandler | Noop implementation of `UserTokenHandler` that always returns `null`.
NullBackoffStrategy | This is a `ConnectionBackoffStrategy` that never backs off, for compatibility with existing behavior.
ProtocolExec | Request executor in the request execution chain that is responsible for implementation of HTTP specification requirements.
ProxyClient | ProxyClient can be used to establish a tunnel via an HTTP proxy.
RedirectExec | Request executor in the request execution chain that is responsible for handling of request redirects.
RetryExec | Request executor in the request execution chain that is responsible for making a decision whether a request failed due to an I/O error should be re-executed.
ServiceUnavailableRetryExec | Request executor in the request execution chain that is responsible for making a decision whether a request that received a non-2xx response from the target server should be re-executed.

Exception Summary
Exception | Description
--- | ---
RequestAbortedException | Signals that the request has been aborted.
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();
     }