2.9.3 (latest) 2.9.2 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4

```java
public class GoogleNetHttpTransport
```
**Deprecated.** *This legacy HttpTransport implementation is no longer being maintained.
Please use {@link [NetHttpTransport](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.http.javanet.NetHttpTransport.md.txt) instead.*

Utilities for Google APIs based on NetHttpTransport.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> GoogleNetHttpTransport

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### newTrustedTransport() (deprecated)

```java
public static NetHttpTransport newTrustedTransport()
```
Returns a new instance of NetHttpTransport that uses [GoogleUtils#getCertificateTrustStore()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.GoogleUtils.md.txt#com_google_api_client_googleapis_GoogleUtils_getCertificateTrustStore__) for the trusted certificates using com.google.api.client.http.javanet.NetHttpTransport.Builder#trustCertificates(KeyStore). If
`GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is set to "true", and the default
client certificate key store from Utils#loadDefaultMtlsKeyStore() is not null, then the
transport uses the default client certificate and is mutual TLS.

This helper method doesn't provide for customization of the NetHttpTransport, such
as the ability to specify a proxy. To do use, use com.google.api.client.http.javanet.NetHttpTransport.Builder, for example:

```java

 static HttpTransport newProxyTransport() throws GeneralSecurityException, IOException {
   NetHttpTransport.Builder builder = new NetHttpTransport.Builder();
   builder.trustCertificates(GoogleUtils.getCertificateTrustStore());
   builder.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 3128)));
   return builder.build();
 }
 
```

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.api.client.http.javanet.NetHttpTransport` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `GeneralSecurityException` |   |
| `IOException` |   |

### newTrustedTransport(MtlsProvider mtlsProvider) (deprecated)

```java
public static NetHttpTransport newTrustedTransport(MtlsProvider mtlsProvider)
```
Beta   

Returns a new instance of NetHttpTransport that uses [GoogleUtils#getCertificateTrustStore()](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.GoogleUtils.md.txt#com_google_api_client_googleapis_GoogleUtils_getCertificateTrustStore__) for the trusted certificates using com.google.api.client.http.javanet.NetHttpTransport.Builder#trustCertificates(KeyStore).
mtlsProvider can be used to configure mutual TLS for the transport.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `mtlsProvider` | `MtlsProvider` MtlsProvider to configure mutual TLS for the transport |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.api.client.http.javanet.NetHttpTransport` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `GeneralSecurityException` |   |
| `IOException` |   |