q-io: how to read response.body JSON object using Promises?
<p>I need to make an http request from one server to another server.</p>

<p>The server that will handle this request will just return a JSON Array of objects:</p>

<pre><code>app.get('/array', function (req, res) {
  console.log('GET request received!');
  var response_array = [
    {
      value: 1234
    },
    {
      value: 1234
    },
    {
      value: 55
    }
  ];

  res.send(response_array);
});
</code></pre>

<p>I am using <code>q-io</code> to send the http request to that GET method <code>/array</code> and obtain the array:</p>

<pre><code>var _getArray = function(externalUrl) {
  var request = {
    method: "GET",
    url: externalUrl
  };

  return HTTP.request(request)
    .then(function(response) {
      // I need to return the Array inside the body (a Promise) to
      // iterate on it later
      return response.body.read(); // but .read() returns a Buffer
    });
}
</code></pre>

<p>Both servers work right, as the request is correctly sent and received from one to another, and also the response. </p>

<p>The <strong>issue</strong> I have is that I am not achieving to obtain the JSON Array - as <code>read()</code> returns a Buffer and just <code>response.body</code> doesn't return the Array (as the docs say, it returns  a representation of a readable stream)... how can I handle this properly to obtain the Array correctly <strong>with Promises</strong>?</p>