| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

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

## 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 | ( | T | response | ) |
| inline protected

byte [] com.ab.network.JsonRequest< T >.getBody | ( |  | ) |
| inline

String com.ab.network.JsonRequest< T >.getBodyContentType | ( |  | ) |
| inline

byte [] com.ab.network.JsonRequest< T >.getPostBody | ( |  | ) |
| inline

弃用:
  Use getBody().

String com.ab.network.JsonRequest< T >.getPostBodyContentType | ( |  | ) |
| inline

弃用:
  Use getBodyContentType().

abstract Response<T> com.ab.network.JsonRequest< T >.parseNetworkResponse | ( | NetworkResponse | response | ) |
| abstract protected

## 类成员变量说明

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"
| static private

Charset for request.

final String com.ab.network.JsonRequest< T >.PROTOCOL_CONTENT_TYPE
| static private

初始值:
=
String.format("application/json; charset=%s", PROTOCOL_CHARSET)

Content type for request.

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

- src/com/ab/network/JsonRequest.java