public class JsonArrayRequest extends JsonRequest<org.json.JSONArray>
JSONArray response body at a given URL, allowing for an
optional JSONArray to be passed in as part of the request body.Request.Method, Request.PriorityPROTOCOL_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.
|
cancel, deliverResponse, getBody, getBodyContentType, getPostBody, getPostBodyContentTypeaddMarker, 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, setShouldRetryConnectionErrors, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryConnectionErrors, shouldRetryServerErrors, toStringpublic JsonArrayRequest(java.lang.String url,
Response.Listener<org.json.JSONArray> listener,
@Nullable
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,
@Nullable
org.json.JSONArray jsonRequest,
Response.Listener<org.json.JSONArray> listener,
@Nullable
Response.ErrorListener errorListener)
method - the HTTP method to useurl - URL to fetch the JSON fromjsonRequest - A JSONArray to post with the request. Null 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)
RequestparseNetworkResponse in class JsonRequest<org.json.JSONArray>response - Response from the network