public interface Response
extends java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Allow the use of
try-with-resources block to only read the minimal amount of data. |
com.google.common.base.Optional<java.io.InputStream> |
getResponseBody()
Access response body if one is available.
|
com.google.common.collect.Multimap<java.lang.String,java.lang.String> |
getResponseHeaders()
Access response headers.
|
int |
getStatusCode()
Access response status code.
|
int getStatusCode()
com.google.common.collect.Multimap<java.lang.String,java.lang.String> getResponseHeaders()
HttpClient, the
returned headers are assumed to be a multimap as it is possible to respond with, for example, multiple
Set-Cookie headers.com.google.common.base.Optional<java.io.InputStream> getResponseBody()
void close()
try-with-resources block to only read the minimal amount of data. Exact behavior is
implementation specific and is considered optional to implement.close in interface java.lang.AutoCloseable