Trying to learn more about node.js by making a simple http proxy server. The use scenario is simple: user -> proxy -> server -> proxy -> user
The following code work
you dont have to 'pause', just 'pipe' is ok
var connector = http.request(options, function(res) { res.pipe(response, {end:true});//tell 'response' end=true }); request.pipe(connector, {end:true});
http request will not finish until you tell it is 'end';