public final class Request
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Request.Options |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
body()
If present, this is the replayable body to send to the server.
|
java.nio.charset.Charset |
charset()
The character set with which the body is encoded, or null if unknown or not applicable.
|
static Request |
create(java.lang.String method,
java.lang.String url,
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> headers,
byte[] body,
java.nio.charset.Charset charset)
No parameters can be null except
body and charset. |
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
headers() |
java.lang.String |
method() |
java.lang.String |
toString() |
java.lang.String |
url() |
public static Request create(java.lang.String method, java.lang.String url, java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> headers, byte[] body, java.nio.charset.Charset charset)
body and charset. All parameters must be
effectively immutable, via safe copies, not mutating or otherwise.public java.lang.String method()
public java.lang.String url()
public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> headers()
public java.nio.charset.Charset charset()
new String(req.body(), req.charset()) to access the body
as a String.public byte[] body()
charset()public java.lang.String toString()
toString in class java.lang.Object