# Package com.google.api.client.http.apache (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.http.apache)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.http.apache)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.http.apache)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.http.apache)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.http.apache)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.http.apache)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.http.apache)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.http.apache)
**Deprecated.** *Please use com.google.api.client.http.apache.v2 provided by the
com.google.http-client:google-http-client-apache-v2 artifact.*

HTTP Transport library for Google API's based on Apache HTTP Client version 4.

## Classes

### [ApacheHttpTransport](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport) (deprecated)

**Deprecated.** *Please use com.google.api.client.http.apache.v2.ApacheHttpTransport provided by the
com.google.http-client:google-http-client-apache-v2 artifact.*

Thread-safe HTTP transport based on the Apache HTTP Client library.

Implementation is thread-safe, as long as any parameter modification to the [Apache HTTP Client](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport#com_google_api_client_http_apache_ApacheHttpTransport_getHttpClient__) is only done at initialization time. For maximum efficiency,
applications should use a single globally-shared instance of the HTTP transport.

Default settings are specified in [#newDefaultHttpClient()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport#com_google_api_client_http_apache_ApacheHttpTransport_newDefaultHttpClient__). Use the [#ApacheHttpTransport(HttpClient)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport#com_google_api_client_http_apache_ApacheHttpTransport_ApacheHttpTransport_org_apache_http_client_HttpClient_) constructor to override the Apache HTTP Client used.
Alternatively, use [#ApacheHttpTransport()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport#com_google_api_client_http_apache_ApacheHttpTransport_ApacheHttpTransport__) and change the [#getHttpClient()](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport#com_google_api_client_http_apache_ApacheHttpTransport_getHttpClient__). Please
read the [Apache HTTP
Client connection management tutorial](http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html) for more complex configuration options.

### [ApacheHttpTransport.Builder](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport.Builder)

Builder for [ApacheHttpTransport](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.ApacheHttpTransport).

Implementation is not thread-safe.