A {@link Client} that utilizes the Apache HTTP Client to send and receiveHTTP request and responses.
The following properties are only supported at construction of this class: {@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_CONNECTION_MANAGER}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_HTTP_PARAMS}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_CREDENTIALS_PROVIDER}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_DISABLE_COOKIES}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_PROXY_URI}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_PROXY_USERNAME}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_PROXY_PASSWORD}}
{@link com.sun.jersey.client.apache4.config.ApacheHttpClient4Config#PROPERTY_PREEMPTIVE_BASIC_AUTHENTICATION}}
The default behaviour of the client is different than what it described in the the property {@link ClientConfig#PROPERTY_CHUNKED_ENCODING_SIZE}. By default, the apache client uses chunked encoding to write the entity. In order to buffer the entity the property {@link ApacheHttpClient4Config#PROPERTY_ENABLE_BUFFERING} must be set to true.
Using of authorization is dependent on the chunk encoding setting. If the entity buffering is enabled, the entity is buffered and authorization can be performed automatically in response to a 401 by sending the request again. When entity buffering is disabled (chunked encoding is used) then the property {@link ApacheHttpClient4Config#PROPERTY_PREEMPTIVE_BASIC_AUTHENTICATION} mustbe set to {@code true}.
If a {@link com.sun.jersey.api.client.ClientResponse} is obtained and anentity is not read from the response then {@link com.sun.jersey.api.client.ClientResponse#close() } MUST be calledafter processing the response to release connection-based resources.
@see ApacheHttpClient4Config#PROPERTY_CONNECTION_MANAGER
@author jorgeluisw@mac.com
@author Paul.Sandoz@Sun.Com
@author pavel.bucek@oracle.com