| AndBase开发框架 1.6

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

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

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

## 类
interface | UrlRewriter

## Public 成员函数
| HurlStack ()
| HurlStack (UrlRewriter urlRewriter)
| HurlStack (UrlRewriter urlRewriter, SSLSocketFactory sslSocketFactory)
HttpResponse | performRequest (Request<?> request, Map< String, String > additionalHeaders) throws IOException, AuthFailureError

## Protected 成员函数
HttpURLConnection | createConnection (URL url) throws IOException

## Private 成员函数
HttpURLConnection | openConnection (URL url, Request<?> request) throws IOException

## 静态 Private 成员函数
static HttpEntity | entityFromConnection (HttpURLConnection connection)

## Private 属性
final UrlRewriter | mUrlRewriter
final SSLSocketFactory | mSslSocketFactory

## 静态 Private 属性
static final String | HEADER_CONTENT_TYPE = "Content-Type"

## 详细描述

An HttpStack based on HttpURLConnection.

## 构造及析构函数说明

com.ab.network.toolbox.HurlStack.HurlStack | ( |  | ) |
| inline

com.ab.network.toolbox.HurlStack.HurlStack | ( | UrlRewriter | urlRewriter | ) |
| inline

参数

  urlRewriter | Rewriter to use for request URLs

com.ab.network.toolbox.HurlStack.HurlStack | ( | UrlRewriter | urlRewriter,
|  | SSLSocketFactory | sslSocketFactory
| ) |  |
| inline

参数

  urlRewriter | Rewriter to use for request URLs
  sslSocketFactory | SSL factory to use for HTTPS connections

## 成员函数说明

HttpURLConnection com.ab.network.toolbox.HurlStack.createConnection | ( | URL | url | ) | throws IOException
| inline protected

Create an HttpURLConnection for the specified

url

.

static HttpEntity com.ab.network.toolbox.HurlStack.entityFromConnection | ( | HttpURLConnection | connection | ) |
| inline static private

Initializes an HttpEntity from the given HttpURLConnection.

参数

  connection |

返回
  an HttpEntity populated with data from `connection`.

HttpURLConnection com.ab.network.toolbox.HurlStack.openConnection | ( | URL | url,
|  | Request<?> | request
| ) |  | throws IOException
| inline private

Opens an HttpURLConnection with parameters.

参数

  url |

返回
  an open connection

异常

  IOException |

HttpResponse com.ab.network.toolbox.HurlStack.performRequest | ( | Request<?> | request,
|  | Map< String, String > | additionalHeaders
| ) |  | throws IOException, AuthFailureError
| inline

Performs an HTTP request with the given parameters.

A GET request is sent if request.getPostBody() == null. A POST request is sent otherwise, and the Content-Type header is set to request.getPostBodyContentType().

参数

  request | the request to perform
  additionalHeaders | additional headers to be sent together with Request#getHeaders()

返回
  the HTTP response

实现了 com.ab.network.toolbox.HttpStack.

## 类成员变量说明

final String com.ab.network.toolbox.HurlStack.HEADER_CONTENT_TYPE = "Content-Type"
| static private

final SSLSocketFactory com.ab.network.toolbox.HurlStack.mSslSocketFactory
| private

final UrlRewriter com.ab.network.toolbox.HurlStack.mUrlRewriter
| private

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

- src/com/ab/network/toolbox/HurlStack.java