Skip to content

KELEN/koa2-request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa2-request

koa2的request库封装,支持async和await写法

安装

npm install koa2-request

使用方法

var koa2Req = require('koa2-request');

app.use(async(ctx, next) => {
	// request选项
	var res = await koa2Req('http://www.baidu.com');
	ctx.body = res.body;
});

About

support async await for request module

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published