public class JsonArrayRequest extends JsonRequest<org.json.JSONArray>
JSONArray
response body at a given URL.Request.Method, Request.Priority
PROTOCOL_CHARSET
Constructor and Description |
---|
JsonArrayRequest(int method,
java.lang.String url,
org.json.JSONArray jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
JsonArrayRequest(java.lang.String url,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
Modifier and Type | Method and Description |
---|---|
protected Response<org.json.JSONArray> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
deliverResponse, getBody, getBodyContentType, getPostBody, getPostBodyContentType
addMarker, cancel, compareTo, deliverError, getCacheEntry, getCacheKey, getErrorListener, getHeaders, getMethod, getParams, getParamsEncoding, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryServerErrors, toString
public JsonArrayRequest(java.lang.String url, Response.Listener<org.json.JSONArray> listener, Response.ErrorListener errorListener)
url
- URL to fetch the JSON fromlistener
- Listener to receive the JSON responseerrorListener
- Error listener, or null to ignore errors.public JsonArrayRequest(int method, java.lang.String url, org.json.JSONArray jsonRequest, Response.Listener<org.json.JSONArray> listener, Response.ErrorListener errorListener)
method
- the HTTP method to useurl
- URL to fetch the JSON fromjsonRequest
- A JSONArray
to post with the request. Null is allowed and
indicates no parameters will be posted along with request.listener
- Listener to receive the JSON responseerrorListener
- Error listener, or null to ignore errors.protected Response<org.json.JSONArray> parseNetworkResponse(NetworkResponse response)
Request
parseNetworkResponse
in class JsonRequest<org.json.JSONArray>
response
- Response from the network