org.apache.http.client.fluent

## Class Request

- java.lang.Object
- - org.apache.http.client.fluent.Request

    public class Request
    extends Object

### Field Summary

Fields
`static String` `DATE_FORMAT`
`static Locale` `DATE_LOCALE`
`static TimeZone` `TIME_ZONE`

### Method Summary

Methods
`void` `abort()`
`Request` `addHeader(org.apache.http.Header header)`
`Request` `addHeader(String name, String value)`
`Request` `body(org.apache.http.HttpEntity entity)`
`Request` `bodyByteArray(byte[] b)`
`Request` `bodyByteArray(byte[] b, org.apache.http.entity.ContentType contentType)`
`Request` `bodyByteArray(byte[] b, int off, int len)`
`Request` `bodyByteArray(byte[] b, int off, int len, org.apache.http.entity.ContentType contentType)`
`Request` `bodyFile(File file, org.apache.http.entity.ContentType contentType)`
`Request` `bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams)`
`Request` `bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams, Charset charset)`
`Request` `bodyForm(org.apache.http.NameValuePair... formParams)`
`Request` `bodyStream(InputStream inStream)`
`Request` `bodyStream(InputStream inStream, org.apache.http.entity.ContentType contentType)`
`Request` `bodyString(String s, org.apache.http.entity.ContentType contentType)`
`Request` `config(String param, Object object)` Deprecated. (4.3)
`Request` `connectTimeout(int timeout)`
`static Request` `Delete(String uri)`
`static Request` `Delete(URI uri)`
`Request` `elementCharset(String charset)` Deprecated. (4.3)
`Response` `execute()`
`static Request` `Get(String uri)`
`static Request` `Get(URI uri)`
`static Request` `Head(String uri)`
`static Request` `Head(URI uri)`
`static Request` `Options(String uri)`
`static Request` `Options(URI uri)`
`static Request` `Patch(String uri)`
`static Request` `Patch(URI uri)`
`static Request` `Post(String uri)`
`static Request` `Post(URI uri)`
`static Request` `Put(String uri)`
`static Request` `Put(URI uri)`
`Request` `removeConfig(String param)` Deprecated. (4.3)
`Request` `removeHeader(org.apache.http.Header header)`
`Request` `removeHeaders(String name)`
`Request` `setCacheControl(String cacheControl)`
`Request` `setDate(Date date)`
`Request` `setHeader(org.apache.http.Header header)`
`Request` `setHeader(String name, String value)`
`Request` `setHeaders(org.apache.http.Header... headers)`
`Request` `setIfModifiedSince(Date date)`
`Request` `setIfUnmodifiedSince(Date date)`
`Request` `socketTimeout(int timeout)`
`Request` `staleConnectionCheck(boolean b)` Deprecated. (4.4)
`String` `toString()`
`static Request` `Trace(String uri)`
`static Request` `Trace(URI uri)`
`Request` `useExpectContinue()`
`Request` `userAgent(String agent)`
`Request` `version(org.apache.http.HttpVersion version)`
`Request` `viaProxy(org.apache.http.HttpHost proxy)`
`Request` `viaProxy(String proxy)`

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

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

### Field Detail

#### DATE_FORMAT

    public static final String DATE_FORMAT

See Also:
  Constant Field Values

#### DATE_LOCALE

    public static final Locale DATE_LOCALE

#### TIME_ZONE

    public static final TimeZone TIME_ZONE

### Method Detail

#### Get

    public static Request Get(URI uri)

#### Get

    public static Request Get(String uri)

#### Head

    public static Request Head(URI uri)

#### Head

    public static Request Head(String uri)

#### Post

    public static Request Post(URI uri)

#### Post

    public static Request Post(String uri)

#### Patch

    public static Request Patch(URI uri)

#### Patch

    public static Request Patch(String uri)

#### Put

    public static Request Put(URI uri)

#### Put

    public static Request Put(String uri)

#### Trace

    public static Request Trace(URI uri)

#### Trace

    public static Request Trace(String uri)

#### Delete

    public static Request Delete(URI uri)

#### Delete

    public static Request Delete(String uri)

#### Options

    public static Request Options(URI uri)

#### Options

    public static Request Options(String uri)

#### execute

    public Response execute()
                     throws ClientProtocolException,
                            IOException

Throws:
  `ClientProtocolException`
  `IOException`

#### abort

    public void abort()
               throws UnsupportedOperationException

Throws:
  `UnsupportedOperationException`

#### addHeader

    public Request addHeader(org.apache.http.Header header)

#### setHeader

    public Request setHeader(org.apache.http.Header header)

Since:
  4.3

#### addHeader

    public Request addHeader(String name,
                    String value)

#### setHeader

    public Request setHeader(String name,
                    String value)

Since:
  4.3

#### removeHeader

    public Request removeHeader(org.apache.http.Header header)

#### removeHeaders

    public Request removeHeaders(String name)

#### setHeaders

    public Request setHeaders(org.apache.http.Header... headers)

#### setCacheControl

    public Request setCacheControl(String cacheControl)

#### setDate

    public Request setDate(Date date)

#### setIfModifiedSince

    public Request setIfModifiedSince(Date date)

#### setIfUnmodifiedSince

    public Request setIfUnmodifiedSince(Date date)

#### config

    @Deprecated
    public Request config(String param,
                            Object object)

Deprecated. (4.3)
This method has no effect. Do not use.

#### removeConfig

    @Deprecated
    public Request removeConfig(String param)

Deprecated. (4.3)
This method has no effect. Do not use.

#### version

    public Request version(org.apache.http.HttpVersion version)

#### elementCharset

    @Deprecated
    public Request elementCharset(String charset)

Deprecated. (4.3)
This parameter can no longer be used at the request level.

This method has no effect. Do not use.

#### useExpectContinue

    public Request useExpectContinue()

#### userAgent

    public Request userAgent(String agent)

#### socketTimeout

    public Request socketTimeout(int timeout)

#### connectTimeout

    public Request connectTimeout(int timeout)

#### staleConnectionCheck

    @Deprecated
    public Request staleConnectionCheck(boolean b)

Deprecated. (4.4)
This method has no effect. Do not use.

#### viaProxy

    public Request viaProxy(org.apache.http.HttpHost proxy)

#### viaProxy

    public Request viaProxy(String proxy)

Since:
  4.4

#### body

    public Request body(org.apache.http.HttpEntity entity)

#### bodyForm

    public Request bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams,
                   Charset charset)

#### bodyForm

    public Request bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams)

#### bodyForm

    public Request bodyForm(org.apache.http.NameValuePair... formParams)

#### bodyString

    public Request bodyString(String s,
                     org.apache.http.entity.ContentType contentType)

#### bodyFile

    public Request bodyFile(File file,
                   org.apache.http.entity.ContentType contentType)

#### bodyByteArray

    public Request bodyByteArray(byte[] b)

#### bodyByteArray

    public Request bodyByteArray(byte[] b,
                        org.apache.http.entity.ContentType contentType)

Since:
  4.4

#### bodyByteArray

    public Request bodyByteArray(byte[] b,
                        int off,
                        int len)

#### bodyByteArray

    public Request bodyByteArray(byte[] b,
                        int off,
                        int len,
                        org.apache.http.entity.ContentType contentType)

Since:
  4.4

#### bodyStream

    public Request bodyStream(InputStream inStream)

#### bodyStream

    public Request bodyStream(InputStream inStream,
                     org.apache.http.entity.ContentType contentType)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`