Created
February 13, 2012 00:24
-
-
Save markdaws/1812063 to your computer and use it in GitHub Desktop.
network sample
This file contains hidden or 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 http = require('http'); | |
function makeRequests() { | |
for(var i=0; i<100; ++i) { | |
http.request({ | |
host: '127.0.0.1', | |
port: 8080, | |
method: 'GET' | |
}, function(res) { | |
// do something with the response | |
}).end(); | |
} | |
} | |
makeRequests(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment