Class HttpConfigOptions.Builder

  • Enclosing class:
    HttpConfigOptions

    public static class HttpConfigOptions.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • disableSslVerification

        public HttpConfigOptions.Builder disableSslVerification​(boolean disableSslVerification)
        Sets flag to disable any SSL certificate verification during HTTP requests. This should ONLY be used if truly intended, as it's unsafe otherwise.
        Parameters:
        disableSslVerification - whether to disable SSL verification or not
        Returns:
        the builder
      • enableGzipCompression

        public HttpConfigOptions.Builder enableGzipCompression​(java.lang.Boolean enableGzipCompression)
        Sets flag to enable gzip compression of request bodies during HTTP requests. This should ONLY be used if truly intended, as many webservers can't handle this.
        Parameters:
        enableGzipCompression - whether to disable SSL verification or not
        Returns:
        the builder
      • enableRateLimitRetry

        @Deprecated
        public HttpConfigOptions.Builder enableRateLimitRetry​(Authenticator authenticator,
                                                              int defaultInterval,
                                                              int maxRetries)
        Deprecated.
        As of 9.13.0, use the HttpConfigOptions.enableRetries() instead.
        Sets retry on rate limiting policy (429). See RateLimitConstants for defaults to use
        Parameters:
        authenticator - to use for retries, the Authenticator used by the client
        defaultInterval - if not specified in the response, how long to wait until the next attempt
        maxRetries - the maximum amount of retries for an request
        Returns:
        the builder
      • enableRetries

        public HttpConfigOptions.Builder enableRetries​(Authenticator authenticator,
                                                       int maxRetries,
                                                       int maxRetryInterval)
        Sets retry specific parameters to enable it.
        Parameters:
        authenticator - to use for retries, the Authenticator used by the client
        maxRetries - the maximum amount of retries for a request
        maxRetryInterval - if not specified in the response, how long to wait until the next attempt
        Returns:
        the builder
      • disableRetries

        public HttpConfigOptions.Builder disableRetries()
        Sets the retry specific parameter to zero to disable the retry functionality.
        Returns:
        the builder
      • proxy

        public HttpConfigOptions.Builder proxy​(java.net.Proxy proxy)
        Sets HTTP proxy to be used by connections with the current client.
        Parameters:
        proxy - the desired Proxy
        Returns:
        the builder
      • proxyAuthenticator

        public HttpConfigOptions.Builder proxyAuthenticator​(okhttp3.Authenticator proxyAuthenticator)
        Sets HTTP proxy authentication to be used by connections with the current client.
        Parameters:
        proxyAuthenticator - the desired Authenticator
        Returns:
        the builder