public class NetworkResponse
extends java.lang.Object
Network.performRequest(Request).| Modifier and Type | Field and Description |
|---|---|
java.util.List<Header> |
allHeaders
All response headers.
|
byte[] |
data
Raw data from this response.
|
java.util.Map<java.lang.String,java.lang.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)
Creates a new network response for an OK response with no headers.
|
NetworkResponse(byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers)
Deprecated.
see
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley. |
NetworkResponse(int statusCode,
byte[] data,
boolean notModified,
long networkTimeMs,
java.util.List<Header> allHeaders)
Creates a new network response.
|
NetworkResponse(int statusCode,
byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified)
Deprecated.
see
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley. |
NetworkResponse(int statusCode,
byte[] data,
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified,
long networkTimeMs)
Deprecated.
see
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley. |
public final int statusCode
public final byte[] data
@Nullable public final java.util.Map<java.lang.String,java.lang.String> headers
This map is case-insensitive. It should not be mutated directly.
Note that if the server returns two headers with the same (case-insensitive) name, this
map will only contain the last one. Use allHeaders to inspect all headers returned
by the server.
@Nullable public final java.util.List<Header> allHeaders
public final boolean notModified
public final long networkTimeMs
@Deprecated
public NetworkResponse(int statusCode,
byte[] data,
@Nullable
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified,
long networkTimeMs)
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley.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,
boolean notModified,
long networkTimeMs,
@Nullable
java.util.List<Header> allHeaders)
statusCode - the HTTP status codedata - Response bodynotModified - True if the server returned a 304 and the data was already in cachenetworkTimeMs - Round-trip network time to receive network responseallHeaders - All headers returned with this response, or null for none@Deprecated
public NetworkResponse(int statusCode,
byte[] data,
@Nullable
java.util.Map<java.lang.String,java.lang.String> headers,
boolean notModified)
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley.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 cachepublic NetworkResponse(byte[] data)
data - Response body@Deprecated
public NetworkResponse(byte[] data,
@Nullable
java.util.Map<java.lang.String,java.lang.String> headers)
NetworkResponse(int, byte[], boolean, long, List). This constructor
cannot handle server responses containing multiple headers with the same name. This
constructor may be removed in a future release of Volley.data - Response bodyheaders - Headers returned with this response, or null for none