public final class Response extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
Response.Body |
static class |
Response.Builder |
Modifier and Type | Method and Description |
---|---|
Response.Body |
body()
if present, the response had a body
|
static Response.Builder |
builder() |
void |
close() |
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
byte[] data)
Deprecated.
To be removed in Feign 10
|
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
InputStream inputStream,
Integer length)
Deprecated.
To be removed in Feign 10
|
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
Response.Body body)
Deprecated.
To be removed in Feign 10
|
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
String text,
Charset charset)
Deprecated.
To be removed in Feign 10
|
Map<String,Collection<String>> |
headers()
Returns a case-insensitive mapping of header names to their values.
|
String |
reason()
Nullable and not set when using http/2
See https://github.com/http2/http2-spec/issues/202
|
Request |
request()
if present, the request that generated this response
|
int |
status()
status code.
|
Response.Builder |
toBuilder() |
String |
toString() |
@Deprecated public static Response create(int status, String reason, Map<String,Collection<String>> headers, InputStream inputStream, Integer length)
@Deprecated public static Response create(int status, String reason, Map<String,Collection<String>> headers, byte[] data)
@Deprecated public static Response create(int status, String reason, Map<String,Collection<String>> headers, String text, Charset charset)
@Deprecated public static Response create(int status, String reason, Map<String,Collection<String>> headers, Response.Body body)
public Response.Builder toBuilder()
public static Response.Builder builder()
public int status()
200
See rfc2616public String reason()
public Map<String,Collection<String>> headers()
public Response.Body body()
public Request request()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2012–2016 OpenFeign. All rights reserved.