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

## Class AsyncRequestBuilder

- java.lang.Object
- - org.apache.hc.client5.http.async.methods.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
`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(HttpHost host, String path)`
`static AsyncRequestBuilder` `delete(String uri)`
`static AsyncRequestBuilder` `delete(URI uri)`
`static AsyncRequestBuilder` `get()`
`static AsyncRequestBuilder` `get(HttpHost host, String path)`
`static AsyncRequestBuilder` `get(String uri)`
`static AsyncRequestBuilder` `get(URI uri)`
`Charset` `getCharset()`
`RequestConfig` `getConfig()`
`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(HttpHost host, String path)`
`static AsyncRequestBuilder` `head(String uri)`
`static AsyncRequestBuilder` `head(URI uri)`
`static AsyncRequestBuilder` `options()`
`static AsyncRequestBuilder` `options(HttpHost host, String path)`
`static AsyncRequestBuilder` `options(String uri)`
`static AsyncRequestBuilder` `options(URI uri)`
`static AsyncRequestBuilder` `patch()`
`static AsyncRequestBuilder` `patch(HttpHost host, String path)`
`static AsyncRequestBuilder` `patch(String uri)`
`static AsyncRequestBuilder` `patch(URI uri)`
`static AsyncRequestBuilder` `post()`
`static AsyncRequestBuilder` `post(HttpHost host, String path)`
`static AsyncRequestBuilder` `post(String uri)`
`static AsyncRequestBuilder` `post(URI uri)`
`static AsyncRequestBuilder` `put()`
`static AsyncRequestBuilder` `put(HttpHost host, String path)`
`static AsyncRequestBuilder` `put(String uri)`
`static AsyncRequestBuilder` `put(URI uri)`
`AsyncRequestBuilder` `removeHeader(Header header)`
`AsyncRequestBuilder` `removeHeaders(String name)`
`AsyncRequestBuilder` `setCharset(Charset charset)`
`AsyncRequestBuilder` `setConfig(RequestConfig config)`
`AsyncRequestBuilder` `setEntity(AsyncEntityProducer entityProducer)`
`AsyncRequestBuilder` `setEntity(byte[] content, ContentType contentType)`
`AsyncRequestBuilder` `setEntity(String content, ContentType contentType)`
`AsyncRequestBuilder` `setHeader(Header header)`
`AsyncRequestBuilder` `setHeader(String name, String value)`
`AsyncRequestBuilder` `setUri(String uri)`
`AsyncRequestBuilder` `setUri(URI uri)`
`AsyncRequestBuilder` `setVersion(ProtocolVersion version)`
`static AsyncRequestBuilder` `trace()`
`static AsyncRequestBuilder` `trace(HttpHost host, String path)`
`static AsyncRequestBuilder` `trace(String uri)`
`static AsyncRequestBuilder` `trace(URI uri)`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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)

#### get

    public static AsyncRequestBuilder get(HttpHost host,
                          String path)

#### head

    public static AsyncRequestBuilder head()

#### head

    public static AsyncRequestBuilder head(URI uri)

#### head

    public static AsyncRequestBuilder head(String uri)

#### head

    public static AsyncRequestBuilder head(HttpHost host,
                           String path)

#### patch

    public static AsyncRequestBuilder patch()

#### patch

    public static AsyncRequestBuilder patch(URI uri)

#### patch

    public static AsyncRequestBuilder patch(String uri)

#### patch

    public static AsyncRequestBuilder patch(HttpHost host,
                            String path)

#### post

    public static AsyncRequestBuilder post()

#### post

    public static AsyncRequestBuilder post(URI uri)

#### post

    public static AsyncRequestBuilder post(String uri)

#### post

    public static AsyncRequestBuilder post(HttpHost host,
                           String path)

#### put

    public static AsyncRequestBuilder put()

#### put

    public static AsyncRequestBuilder put(URI uri)

#### put

    public static AsyncRequestBuilder put(String uri)

#### put

    public static AsyncRequestBuilder put(HttpHost host,
                          String path)

#### delete

    public static AsyncRequestBuilder delete()

#### delete

    public static AsyncRequestBuilder delete(URI uri)

#### delete

    public static AsyncRequestBuilder delete(String uri)

#### delete

    public static AsyncRequestBuilder delete(HttpHost host,
                             String path)

#### trace

    public static AsyncRequestBuilder trace()

#### trace

    public static AsyncRequestBuilder trace(URI uri)

#### trace

    public static AsyncRequestBuilder trace(String uri)

#### trace

    public static AsyncRequestBuilder trace(HttpHost host,
                            String path)

#### options

    public static AsyncRequestBuilder options()

#### options

    public static AsyncRequestBuilder options(URI uri)

#### options

    public static AsyncRequestBuilder options(String uri)

#### options

    public static AsyncRequestBuilder options(HttpHost host,
                              String path)

#### 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)

#### getFirstHeader

    public Header getFirstHeader(String name)

#### getLastHeader

    public Header getLastHeader(String name)

#### getHeaders

    public Header[] getHeaders(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)

#### getConfig

    public RequestConfig getConfig()

#### setConfig

    public AsyncRequestBuilder setConfig(RequestConfig config)

#### getEntity

    public AsyncEntityProducer getEntity()

#### setEntity

    public AsyncRequestBuilder setEntity(AsyncEntityProducer entityProducer)

#### setEntity

    public AsyncRequestBuilder setEntity(String content,
                                ContentType contentType)

#### setEntity

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

#### build

    public AsyncRequestProducer build()