org.jetlang.web

## Class HttpRequest

- java.lang.Object
- - org.jetlang.web.HttpRequest

    public class HttpRequest
    extends Object

### Field Summary

Fields
`static Charset` `defaultBodyCharset`

### Constructor Summary

Constructors
Constructor and Description
`HttpRequest(SocketAddress socketAddress)`
`HttpRequest(String method, String uri, String protocolVersion, SocketAddress remoteAddress)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `add(String name, String value)`
`String` `get(String key)`
`byte[]` `getContent()`
`String` `getContentAsString(boolean failOnUnsupportedEncoding)`
`Charset` `getContentCharset(boolean failOnUnsupported)`
`KeyValueList` `getHeaders()`
`String` `getMethod()`
`String` `getPath()`
`String` `getProtocolVersion()`
`KeyValueList` `getQueryParams()`
`SocketAddress` `getRemoteAddress()`
`URI` `getRequestUri()`
`void` `setRequestUri(URI requestUri)`
`static KeyValueList` `splitQuery(URI url)`
`ByteBuffer` `toByteBuffer(Charset charset)`
`String` `toString()`

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

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

### Field Detail

#### defaultBodyCharset

    public static final Charset defaultBodyCharset

### Constructor Detail

#### HttpRequest

    public HttpRequest(String method,
                       String uri,
                       String protocolVersion,
                       SocketAddress remoteAddress)

#### HttpRequest

    public HttpRequest(SocketAddress socketAddress)

### Method Detail

#### getRemoteAddress

    public SocketAddress getRemoteAddress()

#### getQueryParams

    public KeyValueList getQueryParams()

#### setRequestUri

    public void setRequestUri(URI requestUri)

#### splitQuery

    public static KeyValueList splitQuery(URI url)

#### get

    public String get(String key)

#### getContent

    public byte[] getContent()

#### getHeaders

    public KeyValueList getHeaders()

#### getMethod

    public String getMethod()

#### getRequestUri

    public URI getRequestUri()

#### getPath

    public String getPath()

#### getProtocolVersion

    public String getProtocolVersion()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### add

    public void add(String name,
                    String value)

#### toByteBuffer

    public ByteBuffer toByteBuffer(Charset charset)

#### getContentCharset

    public Charset getContentCharset(boolean failOnUnsupported)

Returns:
  charset found in request or default body charset if one isn't present

#### getContentAsString

    public String getContentAsString(boolean failOnUnsupportedEncoding)