express-apiproxy
v1.6.0
Published
A module to make a bridge between user's request and backend HTTP API server.
Downloads
6
Maintainers
Readme
express-apiproxy
A module to make a bridge between user's request and backend HTTP API server. It works with express.
Usage
var apiproxy = require('apiproxy');
// ... whip up an express app
app.get('/', function (req, res) {
// apiproxy will proxy cookie in `req` to target api address
var request = apiproxy.proxy(req);
request('http://a/b/c.json', function (error, response, body) {
// mikeal/request style response callback
});
});
The apiproxy
proxy will return a request object, it means you can use streaming or options like request, it's very simple.
License
MIT