Created
July 15, 2010 14:59
-
-
Save graphnode/477061 to your computer and use it in GitHub Desktop.
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 sys = require('sys'); | |
var http = require('http'); | |
var time = (new Date).getTime(); | |
var ep = http.createClient(80, "localhost"); | |
http.createServer(function(ureq, ures) { | |
var request = ep.request('get', '/help/', {'host': "localhost"}); | |
request.addListener('response', function(resp) { | |
ures.writeHead(200, resp.headers); | |
sys.pump(resp, ures, function() { | |
request.end(); | |
ures.end(); | |
}); | |
}); | |
}).listen(9090); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment