Interface IHttpClientSettings

All Known Implementing Classes:
HttpClientSettings

public interface IHttpClientSettings
Read-only interface for HttpClientSettings
Since:
9.1.8
Author:
Philip Helger
  • Method Details

    • isUseDNSClientCache

      boolean isUseDNSClientCache()
      Returns:
      true if DNS client caching is enabled (default), false if it is disabled.
    • getSSLContext

      @Nullable SSLContext getSSLContext()
      Create a custom SSLContext to use for the SSL Socket factory.
      Returns:
      null if no custom context is present.
    • getHostnameVerifier

      @Nullable HostnameVerifier getHostnameVerifier()
      Returns:
      The current hostname verifier to be used. Default to null.
    • getTLSConfigurationMode

      @Nullable com.helger.http.tls.ITLSConfigurationMode getTLSConfigurationMode()
      Returns:
      The TLS configuration mode to be used. null means to use the default settings without specific cipher suites.
    • getGeneralProxy

      @Nonnull IHttpProxySettings getGeneralProxy()
      Returns:
      The general HTTP proxy settings to be used. These settings apply to any protocol, except they are overridden in the more specific "http" and "https" proxy settings. Never null.
      Since:
      10.5.0
      See Also:
    • getHttpProxy

      @Nonnull IHttpProxySettings getHttpProxy()
      Returns:
      The HTTP proxy settings to be used exclusively for the "http" protocol. Never null.
      Since:
      10.5.0
      See Also:
    • getHttpsProxy

      @Nonnull IHttpProxySettings getHttpsProxy()
      Returns:
      The HTTP proxy settings to be used exclusively for the "https" protocol. Never null.
      Since:
      10.5.0
      See Also:
    • getRetryCount

      @Nonnegative int getRetryCount()
      Returns:
      The number of retries. Defaults to none.
    • hasRetries

      default boolean hasRetries()
      Returns:
      true if retries are enabled, false if not.
    • getRetryInterval

      @Nonnull Duration getRetryInterval()
      Returns:
      The retry interval (the duration after which a retry is performed). Never null.
    • isRetryAlways

      boolean isRetryAlways()
      Returns:
      true if retries should also be performed for non-idempotent requests.
      Since:
      9.7.1
    • getConnectionRequestTimeout

      @Nonnull org.apache.hc.core5.util.Timeout getConnectionRequestTimeout()
      Returns:
      The connection request timeout in milliseconds. A value of 0 means "indefinite". Never null.
    • getConnectTimeout

      @Nonnull org.apache.hc.core5.util.Timeout getConnectTimeout()
      Returns:
      The connect timeout. Never null.
    • getResponseTimeout

      @Nonnull org.apache.hc.core5.util.Timeout getResponseTimeout()
      Returns:
      The response/read/request/socket timeout. Never null.
    • getUserAgent

      @Nullable String getUserAgent()
      Returns:
      The user agent header to be send. May be null.
      Since:
      9.1.9
    • hasUserAgent

      default boolean hasUserAgent()
      Returns:
      true if a user agent is defined, false if not.
      Since:
      9.1.9
    • isFollowRedirects

      boolean isFollowRedirects()
      Returns:
      true if HTTP redirects (status codes 3xx) should be followed, false if not.
      Since:
      9.1.9
    • isUseKeepAlive

      boolean isUseKeepAlive()
      Returns:
      true if the HTTP Connection "Keep-Alive" should be used, false if not.
      Since:
      9.6.1
    • isProtocolUpgradeEnabled

      boolean isProtocolUpgradeEnabled()
      Returns:
      true if a protocol upgrade e.g. from http to https should be done automatically or not. Since Apache HttpClient 5.4 this became the default.
      Since:
      10.5.0