Server listening on localhost:8080
PhantomJS listening on localhost:8081
Proxy setup to send request to PhantomJS from Server
var proxy = httpProxy.createProxyServer({ target: 'http://localhost:8081'});
var server = http.createServer(function(req, res) {
if (req.url === '/phantom') proxy.web(req, res);
else res.end('yes yes');
});
server.listen(8080);
Post request to http://localhost:8080/phantom
(Server Proxy) has "undefined" request.post
Post request to http://localhost:8081/
(PhantomJS) has populated request.post
What must I do to receive the post data via the proxy?