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
}
)
;
查看全文
相关阅读:
SkyWalking结合Logback获取全局唯一标识 trace-id 记录到日志中
Mysql数据库优化技术
MySQL中集合的差的运算方法
深入理解Java ClassLoader及在 JavaAgent 中的应用
自制吸锡带
Ubuntu下双显示器设定
ffmpeg 命令的使用
ifeq ifneq ifdef ifndef
字符对齐
ruby on rails使用gmail的smtp发送邮件
原文地址:https://www.cnblogs.com/Gbeniot/p/7326357.html
最新文章
JAVA学习之路与大家分享
Hive调优实战
Teradata 和Greenplum 的讨论
Hadoop源代码分析(完整版)
微信小程序onLoad、onShow、onHide、onUnload区别
v-model
video 轮播视频
vue 数据驱动原理,响应式 原理?
微信小程序返回箭头跳转到指定页面
parseInt()、Number()区别
热门文章
数组切片,检索方法对比
各种检索字符串方法
vscode快捷操作
完美解决Uncaught SyntaxError: Unexpected end of input
Alibaba-技术专区-开源项目之RocketMQ组成介绍
全链路追踪技术方案链接
分布式日志链路追踪:skywalking + elasticsearch 部署实践(5.x)
Java 调式、热部署、JVM 背后的支持者 Java Agent
开源APM系统skywalking介绍与使用
定时删除10天前的Es索引
Copyright © 2011-2022 走看看