public class HttpRequest extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
defaultBodyCharset |
Constructor and Description |
---|
HttpRequest(SocketAddress socketAddress) |
HttpRequest(String method,
String uri,
String protocolVersion,
SocketAddress remoteAddress) |
Modifier and Type | Method and Description |
---|---|
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() |
KeyValueList |
parsePostParams(boolean failOnUnsupportedEncoding,
boolean caseSensitiveKeys) |
void |
setRequestUri(URI requestUri) |
static KeyValueList |
splitQuery(URI url) |
ByteBuffer |
toByteBuffer(Charset charset) |
String |
toString() |
public static final Charset defaultBodyCharset
public HttpRequest(String method, String uri, String protocolVersion, SocketAddress remoteAddress)
public HttpRequest(SocketAddress socketAddress)
public SocketAddress getRemoteAddress()
public KeyValueList getQueryParams()
public KeyValueList parsePostParams(boolean failOnUnsupportedEncoding, boolean caseSensitiveKeys)
public void setRequestUri(URI requestUri)
public static KeyValueList splitQuery(URI url)
public byte[] getContent()
public KeyValueList getHeaders()
public String getMethod()
public URI getRequestUri()
public String getPath()
public String getProtocolVersion()
public ByteBuffer toByteBuffer(Charset charset)
public Charset getContentCharset(boolean failOnUnsupported)
public String getContentAsString(boolean failOnUnsupportedEncoding)
Copyright © 2017. All Rights Reserved.