Class HttpConfiguration


public final class HttpConfiguration extends Object
Encapsulates top-level HTTP configuration that applies to all SDK components.

Use HttpConfigurationBuilder to construct an instance.

The SDK's built-in components use OkHttp as the HTTP client implementation, but since OkHttp types are not surfaced in the public API and custom components might use some other implementation, this class only provides the properties that would be used to create an HTTP client; it does not create the client itself. SDK implementation code uses its own helper methods to do so.

  • Constructor Details

  • Method Details

    • getConnectTimeoutMillis

      public int getConnectTimeoutMillis()
      The connection timeout. This is the time allowed for the underlying HTTP client to connect to the LaunchDarkly server.
      the connection timeout in milliseconds
    • getDefaultHeaders

      public Iterable<Map.Entry<String,String>> getDefaultHeaders()
      Returns the basic headers that should be added to all HTTP requests from SDK components to LaunchDarkly services, based on the current SDK configuration.
      a list of HTTP header names and values
    • getHeaderTransform

      public LDHeaderUpdater getHeaderTransform()
      Returns the callback for modifying request headers, if any.
      the callback for modifying request headers
    • isUseReport

      public boolean isUseReport()
      The setting for whether to use the HTTP REPORT method.
      true to use HTTP REPORT