public final class Request extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Request.Body |
static class |
Request.HttpMethod |
static class |
Request.Options |
Modifier and Type | Method and Description |
---|---|
byte[] |
body()
Deprecated.
use
requestBody() instead |
Charset |
charset()
Deprecated.
use
requestBody() instead |
static Request |
create(Request.HttpMethod httpMethod,
String url,
Map<String,Collection<String>> headers,
byte[] body,
Charset charset)
Builds a Request.
|
static Request |
create(Request.HttpMethod httpMethod,
String url,
Map<String,Collection<String>> headers,
Request.Body body)
Builds a Request.
|
static Request |
create(String method,
String url,
Map<String,Collection<String>> headers,
byte[] body,
Charset charset)
Deprecated.
|
Map<String,Collection<String>> |
headers() |
Request.HttpMethod |
httpMethod()
Http Method for the request.
|
String |
method()
Deprecated.
@see
httpMethod() |
Request.Body |
requestBody() |
String |
toString() |
String |
url() |
public static Request create(String method, String url, Map<String,Collection<String>> headers, byte[] body, Charset charset)
create(HttpMethod, String, Map, byte[], Charset)
body
and charset
. All parameters must be
effectively immutable, via safe copies, not mutating or otherwise.public static Request create(Request.HttpMethod httpMethod, String url, Map<String,Collection<String>> headers, byte[] body, Charset charset)
httpMethod
- for the request.url
- for the request.headers
- to include.body
- of the request, can be nullcharset
- of the request, can be nullpublic static Request create(Request.HttpMethod httpMethod, String url, Map<String,Collection<String>> headers, Request.Body body)
httpMethod
- for the request.url
- for the request.headers
- to include.body
- of the request, can be nullpublic String method()
httpMethod()
public Request.HttpMethod httpMethod()
public String url()
public Map<String,Collection<String>> headers()
public Charset charset()
requestBody()
insteadnew String(req.body(), req.charset())
to access the body
as a String.public byte[] body()
requestBody()
insteadcharset()
public Request.Body requestBody()
Copyright © 2012–2019 OpenFeign. All rights reserved.