Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Created November 29, 2014 00:09
Show Gist options
  • Save tarlepp/f01f15339817a1d85a19 to your computer and use it in GitHub Desktop.
Save tarlepp/f01f15339817a1d85a19 to your computer and use it in GitHub Desktop.
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