Class GoogleApache5HttpTransport (2.7.0)

public final class GoogleApache5HttpTransport

Utilities for Google APIs based on Apache5HttpTransport.

Inheritance

java.lang.Object > GoogleApache5HttpTransport

Static Methods

newTrustedTransport()

public static Apache5HttpTransport newTrustedTransport()

Returns a new instance of Apache5HttpTransport 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
Type Description
com.google.api.client.http.apache.v5.Apache5HttpTransport
Exceptions
Type Description
GeneralSecurityException
IOException

newTrustedTransport(MtlsProvider mtlsProvider)

public static Apache5HttpTransport newTrustedTransport(MtlsProvider mtlsProvider)

Beta
Returns a new instance of Apache5HttpTransport that uses GoogleUtils#getCertificateTrustStore() for the trusted certificates. 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.apache.v5.Apache5HttpTransport
Exceptions
Type Description
GeneralSecurityException
IOException