org.apache.hc.client5.http.config

## Class RequestConfig

- java.lang.Object
- - org.apache.hc.client5.http.config.RequestConfig

- All Implemented Interfaces:
    Cloneable

      @Contract(threading=IMMUTABLE)
      public class RequestConfig
      extends Object
      implements Cloneable

  Immutable class encapsulating request configuration items.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RequestConfig.Builder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static RequestConfig` | `DEFAULT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RequestConfig()` Intended for CDI compatibility

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected RequestConfig` | `clone()`
    `static RequestConfig.Builder` | `copy(RequestConfig config)`
    `static RequestConfig.Builder` | `custom()`
    `org.apache.hc.core5.util.TimeValue` | `getConnectionKeepAlive()`
    `org.apache.hc.core5.util.Timeout` | `getConnectionRequestTimeout()`
    `org.apache.hc.core5.util.Timeout` | `getConnectTimeout()` Deprecated. Use `ConnectionConfig.getConnectTimeout()`.
    `String` | `getCookieSpec()`
    `int` | `getMaxRedirects()`
    `org.apache.hc.core5.http.HttpHost` | `getProxy()` Deprecated. Use `DefaultProxyRoutePlanner` or a custom `HttpRoutePlanner`.
    `Collection<String>` | `getProxyPreferredAuthSchemes()`
    `org.apache.hc.core5.util.Timeout` | `getResponseTimeout()`
    `Collection<String>` | `getTargetPreferredAuthSchemes()`
    `boolean` | `isAuthenticationEnabled()`
    `boolean` | `isCircularRedirectsAllowed()`
    `boolean` | `isContentCompressionEnabled()`
    `boolean` | `isExpectContinueEnabled()`
    `boolean` | `isHardCancellationEnabled()`
    `boolean` | `isRedirectsEnabled()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT

          public static final RequestConfig DEFAULT

  - ### Constructor Detail

    - #### RequestConfig

          protected RequestConfig()

      Intended for CDI compatibility

  - ### Method Detail

    - #### isExpectContinueEnabled

          public boolean isExpectContinueEnabled()

      See Also:
        `RequestConfig.Builder.setExpectContinueEnabled(boolean)`

    - #### getProxy

          @Deprecated
          public org.apache.hc.core5.http.HttpHost getProxy()

      Deprecated. Use `DefaultProxyRoutePlanner` or a custom `HttpRoutePlanner`.
      See Also:
        `RequestConfig.Builder.setProxy(HttpHost)`

    - #### getCookieSpec

          public String getCookieSpec()

      See Also:
        `RequestConfig.Builder.setCookieSpec(String)`

    - #### isRedirectsEnabled

          public boolean isRedirectsEnabled()

      See Also:
        `RequestConfig.Builder.setRedirectsEnabled(boolean)`

    - #### isCircularRedirectsAllowed

          public boolean isCircularRedirectsAllowed()

      See Also:
        `RequestConfig.Builder.setCircularRedirectsAllowed(boolean)`

    - #### getMaxRedirects

          public int getMaxRedirects()

      See Also:
        `RequestConfig.Builder.setMaxRedirects(int)`

    - #### isAuthenticationEnabled

          public boolean isAuthenticationEnabled()

      See Also:
        `RequestConfig.Builder.setAuthenticationEnabled(boolean)`

    - #### getTargetPreferredAuthSchemes

          public Collection<String> getTargetPreferredAuthSchemes()

      See Also:
        `RequestConfig.Builder.setTargetPreferredAuthSchemes(Collection)`

    - #### getProxyPreferredAuthSchemes

          public Collection<String> getProxyPreferredAuthSchemes()

      See Also:
        `RequestConfig.Builder.setProxyPreferredAuthSchemes(Collection)`

    - #### getConnectionRequestTimeout

          public org.apache.hc.core5.util.Timeout getConnectionRequestTimeout()

      See Also:
        `RequestConfig.Builder.setConnectionRequestTimeout(Timeout)`

    - #### getConnectTimeout

          @Deprecated
          public org.apache.hc.core5.util.Timeout getConnectTimeout()

      Deprecated. Use `ConnectionConfig.getConnectTimeout()`.
      See Also:
        `RequestConfig.Builder.setConnectTimeout(Timeout)`

    - #### getResponseTimeout

          public org.apache.hc.core5.util.Timeout getResponseTimeout()

      See Also:
        `RequestConfig.Builder.setResponseTimeout(Timeout)`

    - #### getConnectionKeepAlive

          public org.apache.hc.core5.util.TimeValue getConnectionKeepAlive()

      See Also:
        `RequestConfig.Builder.setConnectionKeepAlive(TimeValue)`

    - #### isContentCompressionEnabled

          public boolean isContentCompressionEnabled()

      See Also:
        `RequestConfig.Builder.setContentCompressionEnabled(boolean)`

    - #### isHardCancellationEnabled

          public boolean isHardCancellationEnabled()

      See Also:
        `RequestConfig.Builder.setHardCancellationEnabled(boolean)`

    - #### clone

          protected RequestConfig clone()
                                 throws CloneNotSupportedException

      Overrides:
        `clone` in class `Object`
      Throws:
        `CloneNotSupportedException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### custom

          public static RequestConfig.Builder custom()

    - #### copy

          public static RequestConfig.Builder copy(RequestConfig config)

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.