Top Description Interfaces Classes
[default module]

Package org.apache.http.impl.client


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

Interface Summary

Modifier and TypeInterface and Description
pack-priv interface
Clock

Interface used to enable easier testing of time-related behavior.

Class Summary

Modifier and TypeClass and Description
public abstract class
public abstract class
AbstractHttpClient

Deprecated (4.3) use HttpClientBuilder.
Base class for org.apache.http.client.HttpClient implementations.
public abstract class
AbstractResponseHandler<T>

A generic ResponseHandler that works with the response entity for successful (2xx) responses.

public class
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.

pack-priv class
AuthenticationStrategyAdaptor

Deprecated (4.2) do not use
pack-priv abstract class
public class
AutoRetryHttpClient

Deprecated (4.3) use HttpClientBuilder.
HttpClient implementation that can automatically retry the request in case of a non-2xx response using the ServiceUnavailableRetryStrategy interface.
public class
public class
BasicCookieStore

Default implementation of CookieStore

public class
public class
BasicResponseHandler

A org.apache.http.client.ResponseHandler that returns the response body as a String for successful (2xx) responses.

public class
ClientParamsStack

Deprecated (4.3) use configuration classes provided 'org.apache.http.config' and 'org.apache.http.client.config'
Represents a stack of parameter collections.
public abstract class
CloseableHttpClient

Base implementation of HttpClient that also implements Closeable.

pack-priv class
CloseableHttpResponseProxy

Deprecated Do not use.
public class
ContentEncodingHttpClient

Deprecated (4.2) use HttpClientBuilder
DefaultHttpClient sub-class which includes a RequestAcceptEncoding for the request and response.
public class
public class
DecompressingHttpClient

Deprecated (4.3) use HttpClientBuilder

Decorator adding support for compressed responses.

public class
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.

public class
public class
DefaultConnectionKeepAliveStrategy

Default implementation of a strategy deciding duration that a connection can remain idle.

public class
DefaultHttpClient

Deprecated (4.3) use HttpClientBuilder see also CloseableHttpClient.
Default implementation of org.apache.http.client.HttpClient pre-configured for most common use scenarios.
public class
DefaultHttpRequestRetryHandler

The default HttpRequestRetryHandler used by request executors.

public class
DefaultProxyAuthenticationHandler

Deprecated (4.2) use ProxyAuthenticationStrategy
Default org.apache.http.client.AuthenticationHandler implementation for proxy host authentication.
public class
DefaultRedirectHandler

Deprecated (4.1) use DefaultRedirectStrategy.
Default implementation of RedirectHandler.
public class
DefaultRedirectStrategy

Default implementation of RedirectStrategy.

pack-priv class
DefaultRedirectStrategyAdaptor

Deprecated (4.1) do not use
public class
DefaultRequestDirector

Deprecated Do not use.
Default implementation of RequestDirector.
public class
public class
DefaultTargetAuthenticationHandler

Deprecated (4.2) use TargetAuthenticationStrategy
Default org.apache.http.client.AuthenticationHandler implementation for target host authentication.
public class
DefaultUserTokenHandler

Default implementation of UserTokenHandler.

public class
EntityEnclosingRequestWrapper

Deprecated (4.3) do not use.
A wrapper class for HttpEntityEnclosingRequests that can be used to change properties of the current request without modifying the original object.
public class
FutureRequestExecutionMetrics

Collection of different counters used to gather metrics for FutureRequestExecutionService.

public class
FutureRequestExecutionService

HttpAsyncClientWithFuture wraps calls to execute with a HttpRequestFutureTask and schedules them using the provided executor service.

public class
HttpAuthenticator

Deprecated (4.3) reserved for internal use.
public class
HttpClientBuilder

Builder for CloseableHttpClient instances.

public class
HttpClients

Factory methods for CloseableHttpClient instances.

public class
HttpRequestFutureTask<V>

FutureTask implementation that wraps a HttpAsyncClientCallable and exposes various task specific metrics.

pack-priv class
public class
IdleConnectionEvictor

This class maintains a background thread to enforce an eviction policy for expired / idle persistent connections kept alive in the connection pool.

pack-priv class
InternalHttpClient

Internal class.

public class
LaxRedirectStrategy

Lax org.apache.http.client.RedirectStrategy implementation that automatically redirects all HEAD, GET, POST, and DELETE requests.

pack-priv class
MinimalHttpClient

Internal class.

public class
NoopUserTokenHandler

Noop implementation of UserTokenHandler that always returns null.

public class
NullBackoffStrategy

This is a ConnectionBackoffStrategy that never backs off, for compatibility with existing behavior.

public class
ProxyAuthenticationStrategy

Default org.apache.http.client.AuthenticationStrategy implementation for proxy host authentication.

public class
ProxyClient

ProxyClient can be used to establish a tunnel via an HTTP proxy.

public class
RedirectLocations

This class represents a collection of java.net.URIs used as redirect locations.

public class
RequestWrapper

Deprecated (4.3) do not use.
A wrapper class for HttpRequests that can be used to change properties of the current request without modifying the original object.
public class
RoutedRequest

Deprecated (4.3) do not use.
A request with the route along which it should be sent.
public class
StandardHttpRequestRetryHandler

org.apache.http.client.HttpRequestRetryHandler which assumes that all requested HTTP methods which should be idempotent according to RFC-2616 are in fact idempotent and can be retried.

pack-priv class
SystemClock

The actual system clock.

public class
SystemDefaultCredentialsProvider

Implementation of CredentialsProvider backed by standard JRE Authenticator.

public class
SystemDefaultHttpClient

Deprecated (4.3) use HttpClientBuilder
An extension of DefaultHttpClient pre-configured using system properties.
public class
TargetAuthenticationStrategy

Default org.apache.http.client.AuthenticationStrategy implementation for proxy host authentication.

public class
TunnelRefusedException

Deprecated (4.3) reserved for internal use.
Signals that the tunnel request was rejected by the proxy host.