2016年(48)
分类: JavaScript
2016-11-02 12:02:46
co-request promisify wrapper for request
Simple wrapper to the request library for co-like interface (node.js generator based code). You can use it with koa or co
To install simply run:
点击(此处)折叠或打开
Require co first, also it will work on node v0.11.7 and newest only.
You must run node with --harmony flag (--harmony-generators as well)
点击(此处)折叠或打开
Simple example:
点击(此处)折叠或打开
POST example:
点击(此处)折叠或打开
To pipe request you should use small helper (thanks to ):
点击(此处)折叠或打开
All methods of request listed in
Thanks for Tj's
Thanks for Mikeal's
wemall 开源微商城 ,微信商城,商城源码,三级分销,微生鲜,微水果,微外卖,微订餐---专业的o2o系统