public static class HttpConfigOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpConfigOptions |
build() |
HttpConfigOptions.Builder |
disableRetries()
Sets the retry specific parameter to zero to disable the retry functionality.
|
HttpConfigOptions.Builder |
disableSslVerification(boolean disableSslVerification)
Sets flag to disable any SSL certificate verification during HTTP requests.
|
HttpConfigOptions.Builder |
enableGzipCompression(java.lang.Boolean enableGzipCompression)
Sets flag to enable gzip compression of request bodies during HTTP requests.
|
HttpConfigOptions.Builder |
enableRateLimitRetry(Authenticator authenticator,
int defaultInterval,
int maxRetries)
Deprecated.
As of 9.13.0, use the HttpConfigOptions.enableRetries() instead.
|
HttpConfigOptions.Builder |
enableRetries(Authenticator authenticator,
int maxRetries,
int maxRetryInterval)
Sets retry specific parameters to enable it.
|
HttpConfigOptions.Builder |
loggingLevel(HttpConfigOptions.LoggingLevel loggingLevel)
Sets HTTP logging level to be used by the current client.
|
HttpConfigOptions.Builder |
proxy(java.net.Proxy proxy)
Sets HTTP proxy to be used by connections with the current client.
|
HttpConfigOptions.Builder |
proxyAuthenticator(okhttp3.Authenticator proxyAuthenticator)
Sets HTTP proxy authentication to be used by connections with the current client.
|
public HttpConfigOptions build()
public HttpConfigOptions.Builder disableSslVerification(boolean disableSslVerification)
disableSslVerification
- whether to disable SSL verification or notpublic HttpConfigOptions.Builder enableGzipCompression(java.lang.Boolean enableGzipCompression)
enableGzipCompression
- whether to disable SSL verification or not@Deprecated public HttpConfigOptions.Builder enableRateLimitRetry(Authenticator authenticator, int defaultInterval, int maxRetries)
RateLimitConstants
for defaults to useauthenticator
- to use for retries, the Authenticator
used by the clientdefaultInterval
- if not specified in the response, how long to wait until the next attemptmaxRetries
- the maximum amount of retries for an requestpublic HttpConfigOptions.Builder enableRetries(Authenticator authenticator, int maxRetries, int maxRetryInterval)
authenticator
- to use for retries, the Authenticator
used by the clientmaxRetries
- the maximum amount of retries for a requestmaxRetryInterval
- if not specified in the response, how long to wait until the next attemptpublic HttpConfigOptions.Builder disableRetries()
public HttpConfigOptions.Builder proxy(java.net.Proxy proxy)
proxy
- the desired Proxy
public HttpConfigOptions.Builder proxyAuthenticator(okhttp3.Authenticator proxyAuthenticator)
proxyAuthenticator
- the desired Authenticator
public HttpConfigOptions.Builder loggingLevel(HttpConfigOptions.LoggingLevel loggingLevel)
loggingLevel
- the HttpConfigOptions.LoggingLevel
specifying how much information should be loggedCopyright © 2022 IBM Cloud Developer Experience. All rights reserved.