public class NetworkResponse extends Object
Network.performRequest(Request)
.Modifier and Type | Field and Description |
---|---|
byte[] |
data
Raw data from this response.
|
Map<String,String> |
headers
Response headers.
|
long |
networkTimeMs
Network roundtrip time in milliseconds.
|
boolean |
notModified
True if the server returned a 304 (Not Modified).
|
int |
statusCode
The HTTP status code.
|
Constructor and Description |
---|
NetworkResponse(byte[] data) |
NetworkResponse(byte[] data,
Map<String,String> headers) |
NetworkResponse(int statusCode,
byte[] data,
Map<String,String> headers,
boolean notModified) |
NetworkResponse(int statusCode,
byte[] data,
Map<String,String> headers,
boolean notModified,
long networkTimeMs)
Creates a new network response.
|
public final int statusCode
public final byte[] data
public final boolean notModified
public final long networkTimeMs
public NetworkResponse(int statusCode, byte[] data, Map<String,String> headers, boolean notModified, long networkTimeMs)
statusCode
- the HTTP status codedata
- Response bodyheaders
- Headers returned with this response, or null for nonenotModified
- True if the server returned a 304 and the data was already in cachenetworkTimeMs
- Round-trip network time to receive network responsepublic NetworkResponse(int statusCode, byte[] data, Map<String,String> headers, boolean notModified)
public NetworkResponse(byte[] data)