Created
November 29, 2014 00:09
-
-
Save tarlepp/f01f15339817a1d85a19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var async = require('async'); | |
async.parallel( | |
{ | |
data1: function(callback) { | |
request('someUrl', function (error, response, body) { | |
callback(error, body); | |
}); | |
}, | |
data2: function(callback) { | |
request('someUrl', function (error, response, body) { | |
callback(error, body); | |
}); | |
}, | |
data3: function(callback) { | |
request('someUrl', function (error, response, body) { | |
callback(error, body); | |
}); | |
} | |
}, | |
function(error, results) { | |
console.log(results); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment