title: chunk data logging in node.js
body: <p>I have following function in node.js inside a http.request()</p>
  
  <pre><code>       res.on('data', function (chunk) {
      var sr="response: "+chunk;
      console.log(chunk);
      });
  </code></pre>
  
  <p>I get this in console</p>
  
  <pre><code>&lt;Buffer 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f
   64 69 6e 67 3d 22 75 74 66 2d 38 22 20 3f 3e 3c 72 65 73 75 6c 74 3e 3c 73 75 63
   ...&gt;
  </code></pre>
  
  <p>But when i use this:</p>
  
  <pre><code>res.on('data', function (chunk) {
      var sr="response: "+chunk;
      console.log(sr);
      });
  </code></pre>
  
  <p>I get a proper xml response like this:</p>
  
  <pre><code>responose: .....xml responose.....
  </code></pre>
  
  <p>I don't understand why i need to append a string to output the proper response. And what is meant by the response generated in the first code?</p>