类 JsonObjectRequest
java.lang.Object
com.android.volley.Request<T>
com.android.volley.toolbox.JsonRequest<org.json.JSONObject>
com.android.volley.toolbox.JsonObjectRequest
- 所有已实现的接口:
Comparable<Request<org.json.JSONObject>>
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.-
嵌套类概要
从类继承的嵌套类/接口 com.android.volley.Request
Request.Method, Request.Priority -
字段概要
从类继承的字段 com.android.volley.toolbox.JsonRequest
PROTOCOL_CHARSET -
构造器概要
构造器构造器说明JsonObjectRequest(int method, String url, org.json.JSONObject jsonRequest, Response.Listener<org.json.JSONObject> listener, Response.ErrorListener errorListener) Creates a new request.JsonObjectRequest(String url, org.json.JSONObject jsonRequest, Response.Listener<org.json.JSONObject> listener, Response.ErrorListener errorListener) Constructor which defaults toGETifjsonRequestisnull,POSTotherwise. -
方法概要
修饰符和类型方法说明protected Response<org.json.JSONObject>parseNetworkResponse(NetworkResponse response) Subclasses must implement this to parse the raw network response and return an appropriate response type.从类继承的方法 com.android.volley.toolbox.JsonRequest
deliverResponse, getBody, getBodyContentType, getPostBody, getPostBodyContentType从类继承的方法 com.android.volley.Request
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, setTag, shouldCache, toString
-
构造器详细资料
-
JsonObjectRequest
public JsonObjectRequest(int method, String url, org.json.JSONObject jsonRequest, Response.Listener<org.json.JSONObject> listener, Response.ErrorListener errorListener) Creates a new request.- 参数:
method- the HTTP method to useurl- URL to fetch the JSON fromjsonRequest- AJSONObjectto 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.
-
JsonObjectRequest
public JsonObjectRequest(String url, org.json.JSONObject jsonRequest, Response.Listener<org.json.JSONObject> listener, Response.ErrorListener errorListener) Constructor which defaults toGETifjsonRequestisnull,POSTotherwise.
-
-
方法详细资料
-
parseNetworkResponse
从类复制的说明:RequestSubclasses 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.- 指定者:
parseNetworkResponse在类中JsonRequest<org.json.JSONObject>- 参数:
response- Response from the network- 返回:
- The parsed response, or null in the case of an error
-