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
}
)
;
查看全文
相关阅读:
关于WPF的控件对齐方式
RTC与WebRTC有什么区别
Ubuntu 14.04 单机安装 CEPH
【DP专题】——棋盘分割
征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
原文地址:https://www.cnblogs.com/Gbeniot/p/7326357.html
最新文章
asp.net mvc areas
三层架构
Dictionary在多线程情况下
053315
053314
053313
053312
053311
053310
053309
热门文章
053308
053307
053306
C# Dictionary和KeyValuePair关系
流媒体服务器的作用
GSON实现String和JSON转换
C# Newtonsoft.Json 高级用法
CyberPlayer 使用教程
解决 System.InvalidOperationException:“调用线程无法访问此对象,因为另一个线程拥有该对象。”
VS编程,WPF中,关于TextBlock与TextBox 控件文本垂直居中或者水平居中的说明
Copyright © 2011-2022 走看看