标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
private
void
testGet() { RequestParams
params = new
RequestParams(); params.addQueryStringParameter( "method" ,
"info" ); params.addQueryStringParameter( "access_token" , "3.1042851f652496c9362b1cd77d4f849b.2592000.1377530363.3590808424-248414" ); HttpUtils
http = new
HttpUtils(); http.configCurrRequestExpiry( 1000
* 10 ); http.send(HttpRequest.HttpMethod.GET, "https://pcs.baidu.com/rest/2.0/pcs/quota" , params, new
RequestCallBack<String>() { @Override public
void
onStart() { testTextView.setText( "conn..." ); } @Override public
void
onLoading( long
total, long
current) { testTextView.setText(current
+ "/"
+ total); } @Override public
void
onSuccess(String result) { testTextView.setText( "response:"
+ result); } @Override public
void
onFailure(Throwable error, String msg) { testTextView.setText(msg); } }); } |
xUtils - android工具库,大量更新:bug修复,缓存优化,GET请求加入lru缓存。
标签:
原文地址:http://blog.csdn.net/u014311070/article/details/42676011