Created
August 29, 2013 04:29
-
-
Save sang4lv/6374287 to your computer and use it in GitHub Desktop.
rewrite needed
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 response(res, cb) { | |
| var buffer = ''; | |
| res.on('data', function(chunk) { | |
| buffer += chunk.toString(); | |
| }); | |
| res.on('end', function(){ | |
| console.log(buffer); | |
| }); | |
| cb(); | |
| } | |
| var stream = http.get(process.argv[2], function(res) { | |
| response(res, function() { | |
| http.get(process.argv[3], function(res) { | |
| response(res, function() { | |
| http.get(process.argv[4], function(res) { | |
| response(res, function() {}); | |
| }); | |
| }); | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment