public final class Response extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static interface |
Response.Body |
Modifier and Type | Method and Description |
---|---|
Response.Body |
body()
if present, the response had a body
|
void |
close() |
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
byte[] data) |
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
InputStream inputStream,
Integer length) |
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
Response.Body body) |
static Response |
create(int status,
String reason,
Map<String,Collection<String>> headers,
String text,
Charset charset) |
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
|
int |
status()
status code.
|
String |
toString() |
public static Response create(int status, String reason, Map<String,Collection<String>> headers, InputStream inputStream, Integer length)
public static Response create(int status, String reason, Map<String,Collection<String>> headers, byte[] data)
public static Response create(int status, String reason, Map<String,Collection<String>> headers, String text, Charset charset)
public static Response create(int status, String reason, Map<String,Collection<String>> headers, Response.Body body)
public int status()
200
See rfc2616public String reason()
public Map<String,Collection<String>> headers()
public Response.Body body()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2012–2016 OpenFeign. All rights reserved.