Package org.apache.http.impl.client

Default HTTP client implementation.

See:
          Description

Class Summary
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.
BasicAuthCache Default implementation of AuthCache.
BasicCookieStoreHC4 Default implementation of CookieStore
BasicCredentialsProviderHC4 Default implementation of CredentialsProvider.
BasicResponseHandlerHC4 A ResponseHandler that returns the response body as a String for successful (2xx) responses.
CloseableHttpClient Base implementation of HttpClient that also implements Closeable.
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.
DefaultConnectionKeepAliveStrategyHC4 Default implementation of a strategy deciding duration that a connection can remain idle.
DefaultHttpRequestRetryHandlerHC4 The default HttpRequestRetryHandler used by request executors.
DefaultRedirectStrategy Default implementation of RedirectStrategy.
DefaultServiceUnavailableRetryStrategy Default implementation of the ServiceUnavailableRetryStrategy interface.
DefaultUserTokenHandlerHC4 Default implementation of UserTokenHandler.
EntityEnclosingRequestWrapperHC4 Deprecated. (4.3) do not use.
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.
LaxRedirectStrategy Lax RedirectStrategy implementation that automatically redirects all HEAD, GET and POST requests.
NoopUserTokenHandler Noop implementation of UserTokenHandler that always returns null.
NullBackoffStrategy This is a ConnectionBackoffStrategy that never backs off, for compatibility with existing behavior.
ProxyAuthenticationStrategy Default AuthenticationStrategy implementation for proxy host authentication.
ProxyClient ProxyClient can be used to establish a tunnel via an HTTP proxy.
RedirectLocationsHC4 This class represents a collection of URIs used as redirect locations.
StandardHttpRequestRetryHandler HttpRequestRetryHandler which assumes that all requested HTTP methods which should be idempotent according to RFC-2616 are in fact idempotent and can be retried.
SystemDefaultCredentialsProvider Implementation of CredentialsProvider backed by standard JRE Authenticator.
TargetAuthenticationStrategy Default AuthenticationStrategy implementation for proxy host authentication.
 

Package org.apache.http.impl.client Description

Default HTTP client implementation.

The usual execution flow can be demonstrated by the code snippet below:

 CloseableHttpClient httpclient = HttpClients.createDefault();
 try {
      HttpGetHC4 httpGet = new HttpGetHC4("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
          EntityUtilsHC4.consume(entity);
      } finally {
          response.close();
      }
 } finally {
      httpclient.close();
 }