http pipe实现反向代理大神们帮忙看下
 发布于 9 年前  作者 LinconBruce  3344 次预览  最后一次回复是 9 年前  来自 问答 

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]’); });

客户端毛都没有收到呢???