org.apache.hc.core5.http.support

## Class BasicRequestBuilder

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

-     public class BasicRequestBuilder
      extends AbstractRequestBuilder<BasicHttpRequest>

  Builder for `BasicHttpRequest` instances.
  Since:
    5.1

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BasicRequestBuilder` | `addHeader(Header header)`
    `BasicRequestBuilder` | `addHeader(String name, String value)`
    `BasicRequestBuilder` | `addParameter(NameValuePair nvp)`
    `BasicRequestBuilder` | `addParameter(String name, String value)`
    `BasicRequestBuilder` | `addParameters(NameValuePair... nvps)`
    `BasicHttpRequest` | `build()`
    `static BasicRequestBuilder` | `copy(HttpRequest request)`
    `static BasicRequestBuilder` | `create(String method)`
    `static BasicRequestBuilder` | `delete()`
    `static BasicRequestBuilder` | `delete(String uri)`
    `static BasicRequestBuilder` | `delete(URI uri)`
    `static BasicRequestBuilder` | `get()`
    `static BasicRequestBuilder` | `get(String uri)`
    `static BasicRequestBuilder` | `get(URI uri)`
    `static BasicRequestBuilder` | `head()`
    `static BasicRequestBuilder` | `head(String uri)`
    `static BasicRequestBuilder` | `head(URI uri)`
    `static BasicRequestBuilder` | `options()`
    `static BasicRequestBuilder` | `options(String uri)`
    `static BasicRequestBuilder` | `options(URI uri)`
    `static BasicRequestBuilder` | `patch()`
    `static BasicRequestBuilder` | `patch(String uri)`
    `static BasicRequestBuilder` | `patch(URI uri)`
    `static BasicRequestBuilder` | `post()`
    `static BasicRequestBuilder` | `post(String uri)`
    `static BasicRequestBuilder` | `post(URI uri)`
    `static BasicRequestBuilder` | `put()`
    `static BasicRequestBuilder` | `put(String uri)`
    `static BasicRequestBuilder` | `put(URI uri)`
    `BasicRequestBuilder` | `removeHeader(Header header)`
    `BasicRequestBuilder` | `removeHeaders(String name)`
    `BasicRequestBuilder` | `setAbsoluteRequestUri(boolean absoluteRequestUri)`
    `BasicRequestBuilder` | `setAuthority(URIAuthority authority)`
    `BasicRequestBuilder` | `setCharset(Charset charset)`
    `BasicRequestBuilder` | `setHeader(Header header)`
    `BasicRequestBuilder` | `setHeader(String name, String value)`
    `BasicRequestBuilder` | `setHeaders(Header... headers)`
    `BasicRequestBuilder` | `setHttpHost(HttpHost httpHost)`
    `BasicRequestBuilder` | `setPath(String path)`
    `BasicRequestBuilder` | `setScheme(String scheme)`
    `BasicRequestBuilder` | `setUri(String uri)`
    `BasicRequestBuilder` | `setUri(URI uri)`
    `BasicRequestBuilder` | `setVersion(ProtocolVersion version)`
    `String` | `toString()`
    `static BasicRequestBuilder` | `trace()`
    `static BasicRequestBuilder` | `trace(String uri)`
    `static BasicRequestBuilder` | `trace(URI uri)`

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

      `digest, getAuthority, getCharset, getMethod, getParameters, getPath, getScheme, getUri, isAbsoluteRequestUri`

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

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

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

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

- - ### Method Detail

    - #### create

          public static BasicRequestBuilder create(String method)

    - #### get

          public static BasicRequestBuilder get()

    - #### get

          public static BasicRequestBuilder get(URI uri)

    - #### get

          public static BasicRequestBuilder get(String uri)

    - #### head

          public static BasicRequestBuilder head()

    - #### head

          public static BasicRequestBuilder head(URI uri)

    - #### head

          public static BasicRequestBuilder head(String uri)

    - #### patch

          public static BasicRequestBuilder patch()

    - #### patch

          public static BasicRequestBuilder patch(URI uri)

    - #### patch

          public static BasicRequestBuilder patch(String uri)

    - #### post

          public static BasicRequestBuilder post()

    - #### post

          public static BasicRequestBuilder post(URI uri)

    - #### post

          public static BasicRequestBuilder post(String uri)

    - #### put

          public static BasicRequestBuilder put()

    - #### put

          public static BasicRequestBuilder put(URI uri)

    - #### put

          public static BasicRequestBuilder put(String uri)

    - #### delete

          public static BasicRequestBuilder delete()

    - #### delete

          public static BasicRequestBuilder delete(URI uri)

    - #### delete

          public static BasicRequestBuilder delete(String uri)

    - #### trace

          public static BasicRequestBuilder trace()

    - #### trace

          public static BasicRequestBuilder trace(URI uri)

    - #### trace

          public static BasicRequestBuilder trace(String uri)

    - #### options

          public static BasicRequestBuilder options()

    - #### options

          public static BasicRequestBuilder options(URI uri)

    - #### options

          public static BasicRequestBuilder options(String uri)

    - #### copy

          public static BasicRequestBuilder copy(HttpRequest request)

    - #### setVersion

          public BasicRequestBuilder setVersion(ProtocolVersion version)

      Overrides:
        `setVersion` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setUri

          public BasicRequestBuilder setUri(URI uri)

      Overrides:
        `setUri` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setUri

          public BasicRequestBuilder setUri(String uri)

      Overrides:
        `setUri` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setScheme

          public BasicRequestBuilder setScheme(String scheme)

      Overrides:
        `setScheme` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setAuthority

          public BasicRequestBuilder setAuthority(URIAuthority authority)

      Overrides:
        `setAuthority` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setHttpHost

          public BasicRequestBuilder setHttpHost(HttpHost httpHost)

      Overrides:
        `setHttpHost` in class `AbstractRequestBuilder<BasicHttpRequest>`
      Since:
        5.1

    - #### setPath

          public BasicRequestBuilder setPath(String path)

      Overrides:
        `setPath` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setHeaders

          public BasicRequestBuilder setHeaders(Header... headers)

      Overrides:
        `setHeaders` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### addHeader

          public BasicRequestBuilder addHeader(Header header)

      Overrides:
        `addHeader` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### addHeader

          public BasicRequestBuilder addHeader(String name,
                                      String value)

      Overrides:
        `addHeader` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### removeHeader

          public BasicRequestBuilder removeHeader(Header header)

      Overrides:
        `removeHeader` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### removeHeaders

          public BasicRequestBuilder removeHeaders(String name)

      Overrides:
        `removeHeaders` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setHeader

          public BasicRequestBuilder setHeader(Header header)

      Overrides:
        `setHeader` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setHeader

          public BasicRequestBuilder setHeader(String name,
                                      String value)

      Overrides:
        `setHeader` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setCharset

          public BasicRequestBuilder setCharset(Charset charset)

      Overrides:
        `setCharset` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### addParameter

          public BasicRequestBuilder addParameter(NameValuePair nvp)

      Overrides:
        `addParameter` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### addParameter

          public BasicRequestBuilder addParameter(String name,
                                         String value)

      Overrides:
        `addParameter` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### addParameters

          public BasicRequestBuilder addParameters(NameValuePair... nvps)

      Overrides:
        `addParameters` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### setAbsoluteRequestUri

          public BasicRequestBuilder setAbsoluteRequestUri(boolean absoluteRequestUri)

      Overrides:
        `setAbsoluteRequestUri` in class `AbstractRequestBuilder<BasicHttpRequest>`

    - #### build

          public BasicHttpRequest build()

      Specified by:
        `build` in class `AbstractMessageBuilder<BasicHttpRequest>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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