public class JsonArrayRequest extends JsonRequest<org.json.JSONArray>
JSONArray response body at a given URL.Request.Method, Request.PriorityPROTOCOL_CHARSET| 构造器和说明 |
|---|
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(int method,
java.lang.String url,
org.json.JSONObject jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
JsonArrayRequest(int method,
java.lang.String url,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
JsonArrayRequest(int method,
java.lang.String url,
java.lang.String requestBody,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
JsonArrayRequest(java.lang.String url,
org.json.JSONArray jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Constructor which defaults to
GET if jsonRequest is
null, POST otherwise. |
JsonArrayRequest(java.lang.String url,
org.json.JSONObject jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Constructor which defaults to
GET if jsonRequest is
null, POST otherwise. |
JsonArrayRequest(java.lang.String url,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
Creates a new request.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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, onFinishaddMarker, cancel, compareTo, deliverError, getCacheEntry, getCacheKey, getErrorListener, getHeaders, getIdentifier, getMethod, getOriginUrl, getParams, getParamsEncoding, getPostParams, getPostParamsEncoding, getPriority, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRedirectUrl, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setTag, shouldCache, toStringpublic JsonArrayRequest(int method,
java.lang.String url,
java.lang.String requestBody,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
method - the HTTP method to useurl - URL to fetch the JSON fromrequestBody - A String 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.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,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
method - the HTTP method to useurl - 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.public JsonArrayRequest(int method,
java.lang.String url,
org.json.JSONObject jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
method - the HTTP method to useurl - URL to fetch the JSON fromjsonRequest - A JSONObject 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.public JsonArrayRequest(java.lang.String url,
org.json.JSONArray jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
GET if jsonRequest is
null, POST otherwise.#JsonArrayRequest(int, String, JSONArray, Listener, ErrorListener)public JsonArrayRequest(java.lang.String url,
org.json.JSONObject jsonRequest,
Response.Listener<org.json.JSONArray> listener,
Response.ErrorListener errorListener)
GET if jsonRequest is
null, POST otherwise.#JsonArrayRequest(int, String, JSONObject, Listener, ErrorListener)protected Response<org.json.JSONArray> parseNetworkResponse(NetworkResponse response)
RequestparseNetworkResponse 在类中 JsonRequest<org.json.JSONArray>response - Response from the network