title: NodeJS Request: How to get the response as a string?
body: <p>I'm kind of lost.  Is it possible to get the response body as a string in <code>.on(response)</code> (see below)?  Or am I crazy?  I know I can <code>.pipe</code> the response to a <code>WriteStream</code>, but I need both the response body and the response statusCode at the same place in order to continue my code. Thanks!</p>
  
  <pre><code>var request = require("request");
  request(url)
  .on('response', function(response) {
      console.log(response.statusCode); // 200
      console.log(/* I need to get response body string here */); // &lt;--- can I have the response body as a string here?
  })
  .on("error", function(err){
      console.log("Problem reaching URL: ", err);
  });
  </code></pre>