config-request
v0.5.1
Published
Simple small globally configurable request object
Downloads
20
Readme
config-request
Simple small globally configurable request object
Install
npm install config-request
Usage
var request = require('config-request');
request.configure({
baseUrl: 'http://foo.bar/'
});
// ...
request.get('/path/to', {}, function (err, data) {
});
If you're using observables you could...
request.configure(state.request.config());
state.request.config(request.configure);
Acknowledgement
Most of this code is taken from eaze-request.
License
MIT