public final class Response extends Object
When used directly as a data type for an interface method, the response body is buffered to a
byte[]
. Annotate the method with @Streaming
for an
unbuffered stream from the network.
Constructor and Description |
---|
Response(String url,
int status,
String reason,
List<Header> headers,
TypedInput body) |
Modifier and Type | Method and Description |
---|---|
TypedInput |
getBody()
Response body.
|
List<Header> |
getHeaders()
An unmodifiable collection of headers.
|
String |
getReason()
Status line reason phrase.
|
int |
getStatus()
Status line code.
|
String |
getUrl()
Request URL.
|
public Response(String url, int status, String reason, List<Header> headers, TypedInput body)
public String getUrl()
public int getStatus()
public String getReason()
public TypedInput getBody()
null
.Copyright © 2015 Square, Inc.. All Rights Reserved.