Class GoogleApacheHttpTransport (1.35.1)

public final class GoogleApacheHttpTransport

Utilities for Google APIs based on ApacheHttpTransport.

Inheritance

java.lang.Object > GoogleApacheHttpTransport

Static Methods

newTrustedTransport()

public static ApacheHttpTransport newTrustedTransport()

Returns a new instance of ApacheHttpTransport that uses GoogleUtils#getCertificateTrustStore() for the trusted certificates. 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.

Returns
TypeDescription
com.google.api.client.http.apache.v2.ApacheHttpTransport
Exceptions
TypeDescription
GeneralSecurityException
IOException

newTrustedTransport(MtlsProvider mtlsProvider)

public static ApacheHttpTransport newTrustedTransport(MtlsProvider mtlsProvider)

Beta
Returns a new instance of ApacheHttpTransport that uses GoogleUtils#getCertificateTrustStore() for the trusted certificates. mtlsProvider can be used to configure mutual TLS for the transport.

Parameter
NameDescription
mtlsProviderMtlsProvider

MtlsProvider to configure mutual TLS for the transport

Returns
TypeDescription
com.google.api.client.http.apache.v2.ApacheHttpTransport
Exceptions
TypeDescription
GeneralSecurityException
IOException