Class ClientConfigurationRequestBuilder

java.lang.Object
org.azd.configurations.ClientConfigurationRequestBuilder

public class ClientConfigurationRequestBuilder extends Object
Configuration builder to configure the client settings such as setting default retry and proxy configuration.
  • Constructor Details

    • ClientConfigurationRequestBuilder

      public ClientConfigurationRequestBuilder()
  • Method Details

    • proxy

      public void proxy(ProxyConfiguration proxyConfiguration)
      Configures proxy setting for HttpClient.

      Example:

      
       ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
       proxyConfiguration.proxyUrl = "https://127.0.0.1";
       proxyConfiguration.proxyPort = 8888;
       proxyConfiguration.proxyUsername = System.getenv("https.proxy_username");
       proxyConfiguration.proxyPassword = System.getenv("https.proxy_password");
       proxyConfiguration.noProxyHosts = List.of("hostname");
       
      Parameters:
      proxyConfiguration - Pass the new proxy configuration object.
    • setMaxRetry

      public void setMaxRetry(int maxRetry)
      Sets the maximum retries for retrying the request if "Retry-After" header is found in the response headers. Default retries is set to 3 and maximum value can be set to 6.
      Parameters:
      maxRetry - Maximum retry value.