AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
| Public 成员函数 | Protected 属性 | Private 成员函数 | 静态 Private 属性 | 所有成员列表
com.ab.http.AbRequestParams类 参考

class  FileWrapper
 

Public 成员函数

 AbRequestParams ()
 
 AbRequestParams (Map< String, String > source)
 
 AbRequestParams (String key, String value)
 
void put (String key, String value)
 
void put (String key, File file, String contentType)
 
void put (String key, File file)
 
void remove (String key)
 
String toString ()
 
List< BasicNameValuePair > getParamsList ()
 
String getParamString ()
 
HttpEntity getEntity (AbHttpResponseListener responseListener) throws IOException
 
HttpEntity createFormEntity ()
 
ConcurrentHashMap< String, String > getUrlParams ()
 
void setUrlParams (ConcurrentHashMap< String, String > urlParams)
 

Protected 属性

ConcurrentHashMap< String, String > urlParams
 
ConcurrentHashMap< String,
FileWrapper
fileParams
 

Private 成员函数

void init ()
 
HttpEntity createMultipartEntity (AbHttpResponseListener responseListener) throws IOException
 

静态 Private 属性

static final String APPLICATION_OCTET_STREAM = "application/octet-stream"
 

详细描述

© 2012 amsoft.cn 名称:AbRequestParams.java 描述:Http请求参数

作者
还如一梦中
版本
v1.0
日期
:2013-11-13 上午10:28:55

构造及析构函数说明

com.ab.http.AbRequestParams.AbRequestParams ( )
inline

构造一个空的请求参数.

com.ab.http.AbRequestParams.AbRequestParams ( Map< String, String >  source)
inline

用一个map构造请求参数.

参数
sourcethe source
com.ab.http.AbRequestParams.AbRequestParams ( String  key,
String  value 
)
inline

用一个key和value构造请求参数.

参数
keythe key
valuethe value

成员函数说明

HttpEntity com.ab.http.AbRequestParams.createFormEntity ( )
inline

创建HttpEntity.

返回
the http entity
HttpEntity com.ab.http.AbRequestParams.createMultipartEntity ( AbHttpResponseListener  responseListener) throws IOException
inlineprivate

描述:创建文件域HttpEntity.

参数
responseListenerthe response listener
返回
the http entity
异常
IOExceptionSignals that an I/O exception has occurred.
HttpEntity com.ab.http.AbRequestParams.getEntity ( AbHttpResponseListener  responseListener) throws IOException
inline

获取HttpEntity.

参数
responseListenerthe response listener
返回
the entity
异常
IOExceptionSignals that an I/O exception has occurred.
List<BasicNameValuePair> com.ab.http.AbRequestParams.getParamsList ( )
inline

获取参数列表.

返回
the params list
String com.ab.http.AbRequestParams.getParamString ( )
inline

获取参数字符串.

返回
the param string
ConcurrentHashMap<String, String> com.ab.http.AbRequestParams.getUrlParams ( )
inline

获取url参数.

返回
the url params
void com.ab.http.AbRequestParams.init ( )
inlineprivate

初始化.

void com.ab.http.AbRequestParams.put ( String  key,
String  value 
)
inline

增加一对请求参数.

参数
keythe key
valuethe value
void com.ab.http.AbRequestParams.put ( String  key,
File  file,
String  contentType 
)
inline

增加一个文件域.

参数
keythe key
filethe file
contentTypethe content type of the file, eg. application/json
void com.ab.http.AbRequestParams.put ( String  key,
File  file 
)
inline

增加一个文件域.

参数
keythe key
filethe file
void com.ab.http.AbRequestParams.remove ( String  key)
inline

删除一个请求参数.

参数
keythe key
void com.ab.http.AbRequestParams.setUrlParams ( ConcurrentHashMap< String, String >  urlParams)
inline

设置url参数.

参数
urlParamsthe url params
String com.ab.http.AbRequestParams.toString ( )
inline

描述:转换为参数字符串.

返回
the string

类成员变量说明

final String com.ab.http.AbRequestParams.APPLICATION_OCTET_STREAM = "application/octet-stream"
staticprivate

流常量.

ConcurrentHashMap<String, FileWrapper> com.ab.http.AbRequestParams.fileParams
protected

文件参数.

ConcurrentHashMap<String, String> com.ab.http.AbRequestParams.urlParams
protected

url参数.


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