0.0.1 • Published 8 years ago
koa-restclient v0.0.1
koa-restclient
example
const koaRest = require('koa-restclient');
const app = koa();
app.use(koaRest());
app.use(route.get('/foo', function*() {
const res = yield this.restClient.get(this.request.get('host') + '/foo/one').type('application/json');
this.body = res.body;
return this.body;
}));
0.0.1
8 years ago