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 |
static byte[] |
VERB_CONNECT |
static byte[] |
VERB_DELETE |
static byte[] |
VERB_GET |
static byte[] |
VERB_HEAD |
static byte[] |
VERB_OPTIONS |
static byte[] |
VERB_PATCH |
static byte[] |
VERB_POST |
static byte[] |
VERB_PUT |
static byte[] |
VERB_TRACE |
| Constructor and Description |
|---|
Request(int method,
String uri,
boolean http11) |
Request(Request prototype) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String header) |
byte[] |
getBody() |
String |
getHeader(String key) |
String |
getHeader(String key,
String defaultValue) |
int |
getHeaderCount() |
String[] |
getHeaders() |
String |
getHost() |
int |
getMethod() |
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 static final byte[] VERB_GET
public static final byte[] VERB_POST
public static final byte[] VERB_HEAD
public static final byte[] VERB_OPTIONS
public static final byte[] VERB_PUT
public static final byte[] VERB_DELETE
public static final byte[] VERB_TRACE
public static final byte[] VERB_CONNECT
public static final byte[] VERB_PATCH
public Request(int method,
String uri,
boolean http11)
public Request(Request prototype)
public int getMethod()
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 © 2019. All rights reserved.