http pipe实现反向代理大神们帮忙看下
var http = require(‘http’); var server = http.createServer(function (req, res) { console.log(’[client connected]’ + req.url); http.request({host:‘www.baidu.com’,port:80,path:‘s?wd=nihao’,method:‘get’}).pipe(res); }).listen(8080, function () { console.log(’[server inited]’); });
客户端毛都没有收到呢???