zoukankan
html css js c++ java
superagent-promise
var Promise
=
this
.
Promise
||
require
(
'promise
'
)
;
var agent
=
require
(
'superagent-promise
'
)
(
require
(
'superagent
'
)
, Promise
)
;
// method, url form with `end`
agent
(
'GET
'
,
'
http://google.com
'
)
.
end
(
)
.
then
(
function
onResult
(
res
)
{
// do stuff
}
,
function
onError
(
err
)
{
//err.response has the response from the server
}
)
;
// method, url form with `then`
agent
(
'GET
'
,
'
http://google.com
'
)
.
then
(
function
onResult
(
res
)
{
// do stuff
}
)
;
// helper functions: options, head, get, post, put, patch, del
agent
.
put
(
'
http://myxfoo
'
,
'data
'
)
.
end
(
)
.
then
(
function
(
res
)
{
// do stuff`
}
)
;
// helper functions: options, head, get, post, put, patch, del
agent
.
put
(
'
http://myxfoo
'
,
'data
'
)
.
.
then
(
function
(
res
)
{
// do stuff
}
)
;
查看全文
相关阅读:
xUtils 中的BitmapUtils 全面注释
321影音代码
android studio使用技巧
java android面试题分析总结
android面试题分析总结
据说年薪30万的Android程序员必须知道的帖子
好用软件
win10找回win7的windows照片查看器
github上传代码
android 常见错误集锦
原文地址:https://www.cnblogs.com/Gbeniot/p/7326357.html
最新文章
如何在官网下载android studio
JavaEE面试常见的问题
面试18问
Android:控件GridView的使用
动态设置view的padding和margin值
下拉刷新实现步骤分析及RefreshListView的使用步骤说明
TabLayout替换ViewPagerIndicator
Android 深入理解Android中的自定义属性
ViewPager onPageChangeListener总结
Android 框架练成 教你打造高效的图片加载框架
热门文章
Android框架,Afinal和Xutils哪个框架更稳定好用
开源项目之Android Afinal框架
ViewPagerIndicator的集成步骤
JPush集成方案
Android-ViewPagerIndicator简单集成
开源控件ViewPagerIndicator的使用
Android 开源框架ActionBarSherlock 和 ViewPager 仿网易新闻客户端
Android 开源框架ViewPageIndicator 和 ViewPager 仿网易新闻客户端Tab标签
selector属性
Android设置Selector不同状态下颜色及图片
Copyright © 2011-2022 走看看