BaseOkHttpClientBuilder
A base class for building an OkHttpClient with configurable options.
@param T The type of client to be built.
Functions
Set a default API key to be supplied in every request as the "apikey" header. @param apikey The API key.
Set the connect timeout value in milliseconds to be used while creating the HttpClient.
Enable or disable SSL verification in the client. @param enableSsl Flag to turn on/off SSL verification in the client.
This function should be implemented by subclasses to provide the default user agent suffix. The suffix will be used to construct the default user agent string. @return The default user agent suffix.
Get the configured OkHttpClient instance. If a custom client is not set, it builds a new client. @return The OkHttpClient instance.
Set the keystore password to be used while creating the SSL factory.
Set the path to the keystore to be used while creating the SSL factory. @param keystorePath The path to the keystore.
Set the read timeout value in milliseconds to be used while creating the HttpClient.
Set SSL configuration using a provided SSLConfig object.
Set a custom SSL factory to be used with the default HttpClient. @param factory The custom SSL factory.
Enable or disable SSL hostname verification. @param enable Flag to enable or disable SSL hostname verification.
Set the truststore password to be used while creating the SSL factory.
Set the path to the truststore to be used while creating the SSL factory.
Set the base URL of the target HTTP service. @param url The base URL of the target HTTP service.
Set the user agent to be supplied in each request. @param userAgent The user agent string.