org.apache.hc.client5.http.async.methods

## Class ConfigurableHttpRequest

- java.lang.Object
- - org.apache.hc.core5.http.message.HeaderGroup
  - - org.apache.hc.core5.http.message.BasicHttpRequest
    - - org.apache.hc.client5.http.async.methods.ConfigurableHttpRequest

- All Implemented Interfaces:
    Serializable, Configurable, org.apache.hc.core5.http.HttpMessage, org.apache.hc.core5.http.HttpRequest, org.apache.hc.core5.http.MessageHeaders
  Direct Known Subclasses:
    SimpleHttpRequest

      public class ConfigurableHttpRequest
      extends org.apache.hc.core5.http.message.BasicHttpRequest
      implements Configurable

  HTTP request message with a custom configuration.
  Since:
    5.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurableHttpRequest(String method, org.apache.hc.core5.http.HttpHost host, String path)` Constructs a new request message with the given method, host, and request path.
    `ConfigurableHttpRequest(String method, String path)` Constructs a new request message with the given method and request path.
    `ConfigurableHttpRequest(String method, String scheme, org.apache.hc.core5.net.URIAuthority authority, String path)` Constructs a new request message with the given method, scheme, authority, and request path.
    `ConfigurableHttpRequest(String method, URI requestUri)` Constructs a new request message with the given method, and request URI.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RequestConfig` | `getConfig()` Gets the actual request configuration.
    `void` | `setConfig(RequestConfig requestConfig)` Sets the request configuration.

    - ### Methods inherited from class org.apache.hc.core5.http.message.BasicHttpRequest

      `addHeader, getAuthority, getMethod, getPath, getRequestUri, getScheme, getUri, getVersion, setAbsoluteRequestUri, setAuthority, setHeader, setPath, setScheme, setUri, setVersion, toString`

    - ### Methods inherited from class org.apache.hc.core5.http.message.HeaderGroup

      `addHeader, clear, containsHeader, countHeaders, getCondensedHeader, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator, removeHeader, removeHeaders, removeHeaders, setHeader, setHeaders`

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

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

    - ### Methods inherited from interface org.apache.hc.core5.http.HttpMessage

      `addHeader, removeHeader, removeHeaders, setHeader, setHeaders`

    - ### Methods inherited from interface org.apache.hc.core5.http.MessageHeaders

      `containsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator`

- - ### Constructor Detail

    - #### ConfigurableHttpRequest

          public ConfigurableHttpRequest(String method,
                                         String path)

      Constructs a new request message with the given method and request path.
      Parameters:
        `method` - request method.
        `path` - request path.

    - #### ConfigurableHttpRequest

          public ConfigurableHttpRequest(String method,
                                         org.apache.hc.core5.http.HttpHost host,
                                         String path)

      Constructs a new request message with the given method, host, and request path.
      Parameters:
        `method` - request method.
        `host` - request host.
        `path` - request path.

    - #### ConfigurableHttpRequest

          public ConfigurableHttpRequest(String method,
                                         String scheme,
                                         org.apache.hc.core5.net.URIAuthority authority,
                                         String path)

      Constructs a new request message with the given method, scheme, authority, and request path.
      Parameters:
        `method` - request method.
        `scheme` - request host.
        `authority` - request URI authority.
        `path` - request path.
      Since:
        5.1

    - #### ConfigurableHttpRequest

          public ConfigurableHttpRequest(String method,
                                         URI requestUri)

      Constructs a new request message with the given method, and request URI.
      Parameters:
        `method` - request method.
        `requestUri` - request URI.
      Since:
        5.1

  - ### Method Detail

    - #### getConfig

          public RequestConfig getConfig()

      Description copied from interface: `Configurable`
      Gets the actual request configuration.
      Specified by:
        `getConfig` in interface `Configurable`
      Returns:
        the actual request configuration.

    - #### setConfig

          public void setConfig(RequestConfig requestConfig)

      Sets the request configuration.
      Parameters:
        `requestConfig` - the request configuration.

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