org.apache.hc.core5.http.nio.support

## Class AsyncRequestBuilder

- java.lang.Object
- - org.apache.hc.core5.http.nio.support.AsyncRequestBuilder

-     public class AsyncRequestBuilder
      extends Object

  Builder for `AsyncRequestProducer` instances.

  Please note that this class treats parameters differently depending on composition of the request: if the request has a content entity explicitly set with `setEntity(AsyncEntityProducer)` or it is not an entity enclosing method (such as POST or PUT), parameters will be added to the query component of the request URI. Otherwise, parameters will be added as a URL encoded entity.

  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncRequestBuilder` | `addHeader(Header header)`
    `AsyncRequestBuilder` | `addHeader(String name, String value)`
    `AsyncRequestBuilder` | `addParameter(NameValuePair nvp)`
    `AsyncRequestBuilder` | `addParameter(String name, String value)`
    `AsyncRequestBuilder` | `addParameters(NameValuePair... nvps)`
    `AsyncRequestProducer` | `build()`
    `static AsyncRequestBuilder` | `create(String method)`
    `static AsyncRequestBuilder` | `delete()`
    `static AsyncRequestBuilder` | `delete(String uri)`
    `static AsyncRequestBuilder` | `delete(URI uri)`
    `static AsyncRequestBuilder` | `get()`
    `static AsyncRequestBuilder` | `get(String uri)`
    `static AsyncRequestBuilder` | `get(URI uri)`
    `Charset` | `getCharset()`
    `AsyncEntityProducer` | `getEntity()`
    `Header` | `getFirstHeader(String name)`
    `Header[]` | `getHeaders(String name)`
    `Header` | `getLastHeader(String name)`
    `String` | `getMethod()`
    `List<NameValuePair>` | `getParameters()`
    `URI` | `getUri()`
    `ProtocolVersion` | `getVersion()`
    `static AsyncRequestBuilder` | `head()`
    `static AsyncRequestBuilder` | `head(String uri)`
    `static AsyncRequestBuilder` | `head(URI uri)`
    `static AsyncRequestBuilder` | `options()`
    `static AsyncRequestBuilder` | `options(String uri)`
    `static AsyncRequestBuilder` | `options(URI uri)`
    `static AsyncRequestBuilder` | `patch()`
    `static AsyncRequestBuilder` | `patch(String uri)`
    `static AsyncRequestBuilder` | `patch(URI uri)`
    `static AsyncRequestBuilder` | `post()`
    `static AsyncRequestBuilder` | `post(String uri)`
    `static AsyncRequestBuilder` | `post(URI uri)`
    `static AsyncRequestBuilder` | `put()`
    `static AsyncRequestBuilder` | `put(String uri)`
    `static AsyncRequestBuilder` | `put(URI uri)`
    `AsyncRequestBuilder` | `removeHeader(Header header)`
    `AsyncRequestBuilder` | `removeHeaders(String name)`
    `AsyncRequestBuilder` | `setCharset(Charset charset)`
    `AsyncRequestBuilder` | `setEntity(AsyncEntityProducer entityProducer)`
    `AsyncRequestBuilder` | `setEntity(byte[] content, ContentType contentType)`
    `AsyncRequestBuilder` | `setEntity(String content)`
    `AsyncRequestBuilder` | `setEntity(String content, ContentType contentType)`
    `AsyncRequestBuilder` | `setHeader(Header header)`
    `AsyncRequestBuilder` | `setHeader(String name, String value)`
    `AsyncRequestBuilder` | `setHeaders(Header... headers)`
    `AsyncRequestBuilder` | `setUri(String uri)`
    `AsyncRequestBuilder` | `setUri(URI uri)`
    `AsyncRequestBuilder` | `setVersion(ProtocolVersion version)`
    `String` | `toString()`
    `static AsyncRequestBuilder` | `trace()`
    `static AsyncRequestBuilder` | `trace(String uri)`
    `static AsyncRequestBuilder` | `trace(URI uri)`

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

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

- - ### Method Detail

    - #### create

          public static AsyncRequestBuilder create(String method)

    - #### get

          public static AsyncRequestBuilder get()

    - #### get

          public static AsyncRequestBuilder get(URI uri)

    - #### get

          public static AsyncRequestBuilder get(String uri)

    - #### head

          public static AsyncRequestBuilder head()

    - #### head

          public static AsyncRequestBuilder head(URI uri)

    - #### head

          public static AsyncRequestBuilder head(String uri)

    - #### patch

          public static AsyncRequestBuilder patch()

    - #### patch

          public static AsyncRequestBuilder patch(URI uri)

    - #### patch

          public static AsyncRequestBuilder patch(String uri)

    - #### post

          public static AsyncRequestBuilder post()

    - #### post

          public static AsyncRequestBuilder post(URI uri)

    - #### post

          public static AsyncRequestBuilder post(String uri)

    - #### put

          public static AsyncRequestBuilder put()

    - #### put

          public static AsyncRequestBuilder put(URI uri)

    - #### put

          public static AsyncRequestBuilder put(String uri)

    - #### delete

          public static AsyncRequestBuilder delete()

    - #### delete

          public static AsyncRequestBuilder delete(URI uri)

    - #### delete

          public static AsyncRequestBuilder delete(String uri)

    - #### trace

          public static AsyncRequestBuilder trace()

    - #### trace

          public static AsyncRequestBuilder trace(URI uri)

    - #### trace

          public static AsyncRequestBuilder trace(String uri)

    - #### options

          public static AsyncRequestBuilder options()

    - #### options

          public static AsyncRequestBuilder options(URI uri)

    - #### options

          public static AsyncRequestBuilder options(String uri)

    - #### setCharset

          public AsyncRequestBuilder setCharset(Charset charset)

    - #### getCharset

          public Charset getCharset()

    - #### getMethod

          public String getMethod()

    - #### getUri

          public URI getUri()

    - #### setUri

          public AsyncRequestBuilder setUri(URI uri)

    - #### setUri

          public AsyncRequestBuilder setUri(String uri)

    - #### getVersion

          public ProtocolVersion getVersion()

    - #### setVersion

          public AsyncRequestBuilder setVersion(ProtocolVersion version)

    - #### getHeaders

          public Header[] getHeaders(String name)

    - #### setHeaders

          public AsyncRequestBuilder setHeaders(Header... headers)

    - #### getFirstHeader

          public Header getFirstHeader(String name)

    - #### getLastHeader

          public Header getLastHeader(String name)

    - #### addHeader

          public AsyncRequestBuilder addHeader(Header header)

    - #### addHeader

          public AsyncRequestBuilder addHeader(String name,
                                      String value)

    - #### removeHeader

          public AsyncRequestBuilder removeHeader(Header header)

    - #### removeHeaders

          public AsyncRequestBuilder removeHeaders(String name)

    - #### setHeader

          public AsyncRequestBuilder setHeader(Header header)

    - #### setHeader

          public AsyncRequestBuilder setHeader(String name,
                                      String value)

    - #### getParameters

          public List<NameValuePair> getParameters()

    - #### addParameter

          public AsyncRequestBuilder addParameter(NameValuePair nvp)

    - #### addParameter

          public AsyncRequestBuilder addParameter(String name,
                                         String value)

    - #### addParameters

          public AsyncRequestBuilder addParameters(NameValuePair... nvps)

    - #### getEntity

          public AsyncEntityProducer getEntity()

    - #### setEntity

          public AsyncRequestBuilder setEntity(AsyncEntityProducer entityProducer)

    - #### setEntity

          public AsyncRequestBuilder setEntity(String content,
                                      ContentType contentType)

    - #### setEntity

          public AsyncRequestBuilder setEntity(String content)

    - #### setEntity

          public AsyncRequestBuilder setEntity(byte[] content,
                                      ContentType contentType)

    - #### build

          public AsyncRequestProducer build()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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