Modifier and Type | Class and Description |
---|---|
static class |
Request.Builder
A builder class for
Request instances. |
Modifier and Type | Method and Description |
---|---|
static Request.Builder |
builder() |
byte[] |
getBodyAsBytes() |
InputStream |
getBodyAsStream()
Returns the body content as an
InputStream instance. |
String |
getBodyAsString() |
String |
getContentType() |
Charset |
getEncoding() |
KeyValues |
getHeaders() |
String |
getMethod() |
KeyValues |
getParameters() |
URI |
getURI() |
String |
toString() |
public String getMethod()
public URI getURI()
public KeyValues getParameters()
null
public KeyValues getHeaders()
null
public InputStream getBodyAsStream()
InputStream
instance. This method can be called multiple times
always returning valid, readable stream.InputStream
instancepublic byte[] getBodyAsBytes()
public String getBodyAsString()
Content-Type
header ISO-8859-1 will be used
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html).public String getContentType()
Content-Type
header.public Charset getEncoding()
Content-Type
header or null
if not setpublic static Request.Builder builder()
Request
instancesCopyright © 2016. All Rights Reserved.