Skip to content

Instantly share code, notes, and snippets.

@arisolt
Created February 1, 2013 08:41
Show Gist options
  • Save arisolt/4690140 to your computer and use it in GitHub Desktop.
Save arisolt/4690140 to your computer and use it in GitHub Desktop.
var request = require('request').forever()
, pool = { maxSockets: 1 };
request({ url: '...', pool: pool, timeout: 10}, function(error, response, body) {
console.log(body);
});
setTimeout(function () {request({ url: '...', pool : pool}, function(error, response, body) {
});}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment