public final class Request extends 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.
|
Charset |
charset()
The character set with which the body is encoded, or null if unknown or not applicable.
|
static Request |
create(String method,
String url,
Map<String,Collection<String>> headers,
byte[] body,
Charset charset)
No parameters can be null except
body and charset . |
Map<String,Collection<String>> |
headers() |
String |
method() |
String |
toString() |
String |
url() |
public static Request create(String method, String url, Map<String,Collection<String>> headers, byte[] body, Charset charset)
body
and charset
. All parameters must be
effectively immutable, via safe copies, not mutating or otherwise.public String method()
public String url()
public Map<String,Collection<String>> headers()
public Charset charset()
new String(req.body(), req.charset())
to access the body
as a String.public byte[] body()
charset()
Copyright © 2012–2016 OpenFeign. All rights reserved.