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

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
参数
urlRewriterRewriter to use for request URLs
com.ab.network.toolbox.HurlStack.HurlStack ( UrlRewriter  urlRewriter,
SSLSocketFactory  sslSocketFactory 
)
inline
参数
urlRewriterRewriter to use for request URLs
sslSocketFactorySSL factory to use for HTTPS connections

成员函数说明

HttpURLConnection com.ab.network.toolbox.HurlStack.createConnection ( URL  url) throws IOException
inlineprotected

Create an HttpURLConnection for the specified

url

.

static HttpEntity com.ab.network.toolbox.HurlStack.entityFromConnection ( HttpURLConnection  connection)
inlinestaticprivate

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
inlineprivate

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().

参数
requestthe request to perform
additionalHeadersadditional 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"
staticprivate
final SSLSocketFactory com.ab.network.toolbox.HurlStack.mSslSocketFactory
private
final UrlRewriter com.ab.network.toolbox.HurlStack.mUrlRewriter
private

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