superagent-hosts

0.3.0 • Public • Published

superagent-hosts

extra hosts file for nodejs superagent requests

Build Status

Example

./hosts

192.168.10.12 foobar.com

./app.js

var request = require('superagent');
var hosts = require('superagent-hosts');
var config = require('fs').readFileSync('./hosts').toString();
request
  .get('http://foobar.com/path/to')
  .use(hosts(config))
  .end(function (err, res) {
    // ...
  });

License

the MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    3
  • 0.2.0
    0

Package Sidebar

Install

npm i superagent-hosts

Weekly Downloads

2

Version

0.3.0

License

MIT

Last publish

Collaborators

  • yelo