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
}
)
;
查看全文
相关阅读:
链接错误error LNK2005可能原因之一
ACCESS一些特殊数据类型
flex&bison学习笔记(2)
经典小故事
spoj 2939 Query on a tree V 动态树分治
spoj 913 Query on a tree II 倍增
CEOI 2004 sweets 容斥原理
poj 1741 Tree 树的分治
zjoi 2007 hide 捉迷藏 动态树分治
spoj 2798 Query on a tree again! 树链剖分
原文地址:https://www.cnblogs.com/Gbeniot/p/7326357.html
最新文章
pythonchallenge5
Planar Shadow中Shadow Matrix的推导
SkinMesh MD5Loader
挪下窝...
mina的简单例子
批量把文件编码由某一编码转为另一编码
iis6,域名可以正常访问,但是 输入IP却不能访问
安装Adobe Flash Player证书验证失败
Java判断文件编码格式
Linux文件与Windows文件的文件/文件名编码转换方法
热门文章
WinSCP乱码问题
ch.ethz.ganymed包ganymedssh2的使用
关于java对象Clone问题
JAVA中的泛型
DLL导出函数小问题
VS.NET 2005中头文件/CPP文件切换的宏
32位CRC循环冗余检查码算法
flex&bison 学习笔记(1)
浮点数取小数点后几位的方法
Visual Studio 2005 XviD编译过程
Copyright © 2011-2022 走看看