public class Request extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
METHOD_CONNECT |
static int |
METHOD_DELETE |
static int |
METHOD_GET |
static int |
METHOD_HEAD |
static int |
METHOD_OPTIONS |
static int |
METHOD_PATCH |
static int |
METHOD_POST |
static int |
METHOD_PUT |
static int |
METHOD_TRACE |
static int |
NUMBER_OF_METHODS |
| Constructor and Description |
|---|
Request(int method,
String uri,
boolean http11) |
Request(Request prototype) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String header) |
void |
consumeHeaders(String prefix,
Consumer<String> suffixConsumer) |
byte[] |
getBody() |
String |
getHeader(String key) |
String |
getHeader(String key,
String defaultValue) |
int |
getHeaderCount() |
String[] |
getHeaders() |
String |
getHost() |
int |
getMethod() |
String |
getMethodName() |
String |
getParameter(String key) |
String |
getParameter(String key,
String defaultValue) |
Iterable<Map.Entry<String,String>> |
getParameters() |
Iterator<String> |
getParameters(String key) |
String |
getPath() |
String |
getQueryString() |
String |
getRequiredHeader(String key) |
String |
getRequiredParameter(String key) |
String |
getURI() |
boolean |
isHttp11() |
void |
setBody(byte[] body) |
void |
setBodyUtf8(String body) |
byte[] |
toBytes() |
String |
toString() |
public static final int METHOD_GET
public static final int METHOD_POST
public static final int METHOD_HEAD
public static final int METHOD_OPTIONS
public static final int METHOD_PUT
public static final int METHOD_DELETE
public static final int METHOD_TRACE
public static final int METHOD_CONNECT
public static final int METHOD_PATCH
public static final int NUMBER_OF_METHODS
public Request(int method,
String uri,
boolean http11)
public Request(Request prototype)
public int getMethod()
public String getMethodName()
public String getURI()
public boolean isHttp11()
public String getPath()
public String getQueryString()
public Iterable<Map.Entry<String,String>> getParameters()
Iterable over String key[=[value]] parameters
skipping empty parameterspublic int getHeaderCount()
public String[] getHeaders()
public void addHeader(String header)
public byte[] getBody()
public void setBody(byte[] body)
public void setBodyUtf8(String body)
public String getHost()
public byte[] toBytes()
Copyright © 2020. All rights reserved.