org.apache.hc.core5.http.support

## Class AbstractRequestBuilder<T>

- java.lang.Object
- - org.apache.hc.core5.http.support.AbstractMessageBuilder<T>
  - - org.apache.hc.core5.http.support.AbstractRequestBuilder<T>

- Direct Known Subclasses:
    AsyncRequestBuilder, BasicRequestBuilder, ClassicRequestBuilder

      public abstract class AbstractRequestBuilder<T>
      extends AbstractMessageBuilder<T>

  Builder for `BasicHttpRequest` instances.
  Since:
    5.1

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractRequestBuilder(Method method)`
    `protected` | `AbstractRequestBuilder(Method method, String uri)`
    `protected` | `AbstractRequestBuilder(Method method, URI uri)`
    `protected` | `AbstractRequestBuilder(String method)`
    `protected` | `AbstractRequestBuilder(String method, String uri)`
    `protected` | `AbstractRequestBuilder(String method, URI uri)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractRequestBuilder<T>` | `addHeader(Header header)`
    `AbstractRequestBuilder<T>` | `addHeader(String name, String value)`
    `AbstractRequestBuilder<T>` | `addParameter(NameValuePair nvp)`
    `AbstractRequestBuilder<T>` | `addParameter(String name, String value)`
    `AbstractRequestBuilder<T>` | `addParameters(NameValuePair... nvps)`
    `protected void` | `digest(HttpRequest request)`
    `URIAuthority` | `getAuthority()`
    `Charset` | `getCharset()`
    `String` | `getMethod()`
    `List<NameValuePair>` | `getParameters()`
    `String` | `getPath()`
    `String` | `getScheme()`
    `URI` | `getUri()`
    `boolean` | `isAbsoluteRequestUri()`
    `AbstractRequestBuilder<T>` | `removeHeader(Header header)`
    `AbstractRequestBuilder<T>` | `removeHeaders(String name)`
    `AbstractRequestBuilder<T>` | `setAbsoluteRequestUri(boolean absoluteRequestUri)`
    `AbstractRequestBuilder<T>` | `setAuthority(URIAuthority authority)`
    `AbstractRequestBuilder<T>` | `setCharset(Charset charset)`
    `AbstractRequestBuilder<T>` | `setHeader(Header header)`
    `AbstractRequestBuilder<T>` | `setHeader(String name, String value)`
    `AbstractRequestBuilder<T>` | `setHeaders(Header... headers)`
    `AbstractRequestBuilder<T>` | `setHttpHost(HttpHost httpHost)`
    `AbstractRequestBuilder<T>` | `setPath(String path)`
    `AbstractRequestBuilder<T>` | `setScheme(String scheme)`
    `AbstractRequestBuilder<T>` | `setUri(String uri)`
    `AbstractRequestBuilder<T>` | `setUri(URI uri)`
    `AbstractRequestBuilder<T>` | `setVersion(ProtocolVersion version)`

    - ### Methods inherited from class org.apache.hc.core5.http.support.AbstractMessageBuilder

      `build, digest, getFirstHeader, getFirstHeaders, getHeaders, getHeaders, getLastHeader, getVersion, setHeaders`

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

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

- - ### Constructor Detail

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(String method)

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(Method method)

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(String method,
                                URI uri)

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(Method method,
                                URI uri)

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(Method method,
                                String uri)

    - #### AbstractRequestBuilder

          protected AbstractRequestBuilder(String method,
                                String uri)

  - ### Method Detail

    - #### digest

          protected void digest(HttpRequest request)

    - #### getMethod

          public String getMethod()

    - #### setVersion

          public AbstractRequestBuilder<T> setVersion(ProtocolVersion version)

      Overrides:
        `setVersion` in class `AbstractMessageBuilder<T>`

    - #### getScheme

          public String getScheme()

    - #### setScheme

          public AbstractRequestBuilder<T> setScheme(String scheme)

    - #### getAuthority

          public URIAuthority getAuthority()

    - #### setAuthority

          public AbstractRequestBuilder<T> setAuthority(URIAuthority authority)

    - #### setHttpHost

          public AbstractRequestBuilder<T> setHttpHost(HttpHost httpHost)

    - #### getPath

          public String getPath()

    - #### setPath

          public AbstractRequestBuilder<T> setPath(String path)

    - #### getUri

          public URI getUri()

    - #### setUri

          public AbstractRequestBuilder<T> setUri(URI uri)

    - #### setUri

          public AbstractRequestBuilder<T> setUri(String uri)

    - #### setHeaders

          public AbstractRequestBuilder<T> setHeaders(Header... headers)

      Overrides:
        `setHeaders` in class `AbstractMessageBuilder<T>`

    - #### addHeader

          public AbstractRequestBuilder<T> addHeader(Header header)

      Overrides:
        `addHeader` in class `AbstractMessageBuilder<T>`

    - #### addHeader

          public AbstractRequestBuilder<T> addHeader(String name,
                                            String value)

      Overrides:
        `addHeader` in class `AbstractMessageBuilder<T>`

    - #### removeHeader

          public AbstractRequestBuilder<T> removeHeader(Header header)

      Overrides:
        `removeHeader` in class `AbstractMessageBuilder<T>`

    - #### removeHeaders

          public AbstractRequestBuilder<T> removeHeaders(String name)

      Overrides:
        `removeHeaders` in class `AbstractMessageBuilder<T>`

    - #### setHeader

          public AbstractRequestBuilder<T> setHeader(Header header)

      Overrides:
        `setHeader` in class `AbstractMessageBuilder<T>`

    - #### setHeader

          public AbstractRequestBuilder<T> setHeader(String name,
                                            String value)

      Overrides:
        `setHeader` in class `AbstractMessageBuilder<T>`

    - #### getCharset

          public Charset getCharset()

    - #### setCharset

          public AbstractRequestBuilder<T> setCharset(Charset charset)

    - #### getParameters

          public List<NameValuePair> getParameters()

    - #### addParameter

          public AbstractRequestBuilder<T> addParameter(NameValuePair nvp)

    - #### addParameter

          public AbstractRequestBuilder<T> addParameter(String name,
                                               String value)

    - #### addParameters

          public AbstractRequestBuilder<T> addParameters(NameValuePair... nvps)

    - #### isAbsoluteRequestUri

          public boolean isAbsoluteRequestUri()

    - #### setAbsoluteRequestUri

          public AbstractRequestBuilder<T> setAbsoluteRequestUri(boolean absoluteRequestUri)

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