java.lang.Object | |||
↳ | com.android.volley.Request<T> | ||
↳ | com.android.volley.toolbox.JsonRequest<T> | ||
↳ | com.android.volley.toolbox.JsonObjectRequest |
A request for retrieving a JSONObject response body at a given URL, allowing for an optional JSONObject to be passed in as part of the request body.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.android.volley.toolbox.JsonRequest
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JsonObjectRequest(int method, String url, JSONObject jsonRequest, Listener<JSONObject> listener, Response.ErrorListener errorListener)
Creates a new request.
| |||||||||||
JsonObjectRequest(String url, JSONObject jsonRequest, Listener<JSONObject> listener, Response.ErrorListener errorListener)
Constructor which defaults to
GET if jsonRequest is
null , POST otherwise. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Response<JSONObject> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.android.volley.toolbox.JsonRequest
| |||||||||||
From class
com.android.volley.Request
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
|
Creates a new request.
method | the HTTP method to use |
---|---|
url | URL to fetch the JSON from |
jsonRequest | 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 response |
errorListener | Error listener, or null to ignore errors. |
Constructor which defaults to GET
if jsonRequest
is
null
, POST
otherwise.
Subclasses must implement this to parse the raw network response and return an appropriate response type. This method will be called from a worker thread. The response will not be delivered if you return null.
response | Response from the network |
---|