express-apiproxy

A module to make a bridge between user's request and backend HTTP API server.

npm install express-apiproxy
1 downloads in the last week
20 downloads in the last month

express-apiproxy

Build Status

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

npm loves you