0.1.3 • Published 10 years ago

request-fork v0.1.3

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

request-fork npm.io npm.io

Take a single request object and send it to multiple targets.

Install

npm install request-fork

Usage

var requestFork = require('request-fork')

var req = {
  method: 'GET',
  url: 'https://mockbin.com/status/502',
  headers: {
    'User-Agent': 'request-fork'
  }
}

var targets = [
  "https://mockbin.com/status/200",
  "https://mockbin.com/status/404"
]

requestFork(req, targets, function(responses, errors) {
  if (errors) throw errors
  responses.map(function(res){
    console.log(res.statusCode)
  })
})

Contributing

Feedback and pull requests are most welcomed.

MIT license

Copyright (c) 2015, Mashape (https://www.mashape.com/)

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago