title: Get response from proxy server
body: <p>I created a proxy server in node.js using the node-http-proxy module.</p>
  
  <p>Looks like this: </p>
  
  <pre><code>var http = require('http'),
  httpProxy = require('http-proxy'),
  io = require("socket.io").listen(5555);
  
  var proxy = new httpProxy.RoutingProxy();
  
  http.createServer(function (req, res) {
       proxy.proxyRequest(req, res, {
           host: 'localhost',
           port: 1338
       });
  }).listen(9000);
  </code></pre>
  
  <p>So, I need, before sending the response back to the client to get the body from the server that I proxy and analyze it.</p>
  
  <p>But I can't find event or attribute, where I can get this data. I tried:</p>
  
  <pre><code>proxy.on('end', function (data) {
      console.log('end');
  });
  </code></pre>
  
  <p>But I can't figure our how to get the mime body from it.</p>