AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | Protected 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
com.ab.network.JsonRequest< T >类 参考abstract
类 com.ab.network.JsonRequest< T > 继承关系图:
com.ab.network.JsonArrayRequest com.ab.network.JsonObjectRequest

Public 成员函数

 JsonRequest (String url, String requestBody, Listener< T > listener, ErrorListener errorListener)
 
 JsonRequest (int method, String url, String requestBody, Listener< T > listener, ErrorListener errorListener)
 
String getPostBodyContentType ()
 
byte[] getPostBody ()
 
String getBodyContentType ()
 
byte[] getBody ()
 

Protected 成员函数

void deliverResponse (T response)
 
abstract Response< T > parseNetworkResponse (NetworkResponse response)
 

Private 属性

final Listener< T > mListener
 
final String mRequestBody
 

静态 Private 属性

static final String PROTOCOL_CHARSET = "utf-8"
 
static final String PROTOCOL_CONTENT_TYPE
 

详细描述

A request for retrieving a T type response body at a given URL that also optionally sends along a JSON body in the request specified.

参数
<T>JSON type of response expected

构造及析构函数说明

com.ab.network.JsonRequest< T >.JsonRequest ( String  url,
String  requestBody,
Listener< T >  listener,
ErrorListener  errorListener 
)
inline

Deprecated constructor for a JsonRequest which defaults to GET unless getPostBody() or getPostParams() is overridden (which defaults to POST).

弃用:
Use JsonRequest(int, String, String, Listener, ErrorListener).
com.ab.network.JsonRequest< T >.JsonRequest ( int  method,
String  url,
String  requestBody,
Listener< T >  listener,
ErrorListener  errorListener 
)
inline

成员函数说明

void com.ab.network.JsonRequest< T >.deliverResponse ( response)
inlineprotected
byte [] com.ab.network.JsonRequest< T >.getBody ( )
inline
String com.ab.network.JsonRequest< T >.getBodyContentType ( )
inline
byte [] com.ab.network.JsonRequest< T >.getPostBody ( )
inline
String com.ab.network.JsonRequest< T >.getPostBodyContentType ( )
inline
abstract Response<T> com.ab.network.JsonRequest< T >.parseNetworkResponse ( NetworkResponse  response)
abstractprotected

类成员变量说明

final Listener<T> com.ab.network.JsonRequest< T >.mListener
private
final String com.ab.network.JsonRequest< T >.mRequestBody
private
final String com.ab.network.JsonRequest< T >.PROTOCOL_CHARSET = "utf-8"
staticprivate

Charset for request.

final String com.ab.network.JsonRequest< T >.PROTOCOL_CONTENT_TYPE
staticprivate
初始值:
=
String.format("application/json; charset=%s", PROTOCOL_CHARSET)

Content type for request.


该类的文档由以下文件生成: