api.js 380 Bytes
'use strict';

const Context = require('./context');
const request = require('request-promise');

class Api extends Context {
    get(url, data) {
        console.log(this.ctx.req.header('host'))
        return Promise.resolve(data);
    }
    post(url, data) {
        console.log(this.ctx.req.header('host'))
        return Promise.resolve(data);
    }
}

module.exports = Api;