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
}
)
;
查看全文
相关阅读:
Search Insert Position
Sum Root to Leaf Numbers
String to Integer (atoi)
Populating Next Right Pointers in Each Node
Triangle
Pascal's Triangle II
Longest Consecutive Sequence
属性透明度
ul的列表符号在IE6下显示不全
table的属性border-collapse 设置边框是否合并
原文地址:https://www.cnblogs.com/Gbeniot/p/7326357.html
最新文章
bundle和package
收藏一下别人的关于ReactiveCocoa的一篇文章
Tabbar隐藏问题的解决方案
UI进阶 即时通讯之卸载Openfire
处理Xcode 警告
关于UIImage类的对象两种初始化方法的区别
UI进阶 即时通讯之XMPP好友列表、添加好友、获取会话内容、简单聊天
Android与Swift iOS开发:语言与框架对比
CocoaPosd使用详解
flex中toolTip汇总 转
热门文章
Flex自适应屏幕
Flex中如何打开网页及Get/Post数据 转
post和get的区别 汇总
flex 与 后台通讯
Flash 中与 JS 的通信
bitmapdata转成bytearray
内嵌字体
Binary Tree Zigzag Level Order Traversal
Binary Tree Maximum Path Sum
Binary Tree Preorder Traversal
Copyright © 2011-2022 走看看