title: Not getting expected response from Guzzle
body: <p>I'm trying to build an endpoint that forwards the data passed to it to an API using the Slim PHP Framework and I'm having trouble getting my response from a Guzzle request.</p>
  
  <pre><code>$app-&gt;map( '/api_call/:method', function( $method ) use( $app ){
      $client = new GuzzleHttp\Client([
          'base_url' =&gt; $app-&gt;config( 'api_base_url' ),
          'defaults' =&gt; [
              'query'   =&gt; [ 'access_token' =&gt; 'foo' ],
          ]
      ]);
  
      $request = $client-&gt;createRequest( $app-&gt;request-&gt;getMethod(), $method, [
          'query' =&gt; $app-&gt;request-&gt;params()
      ]);
  
      var_dump( $client-&gt;send( $request )-&gt;getBody() );
  
  })-&gt;via( 'GET', 'POST', 'PUT', 'PATCH', 'DELETE' )-&gt;conditions( [ 'route' =&gt; '.+?' ] );`
  </code></pre>
  
  <p>This then gives me...</p>
  
  <pre><code>object(GuzzleHttp\Stream\Stream)[59]
    private 'stream' =&gt; resource(72, stream)
    private 'size' =&gt; null
    private 'seekable' =&gt; boolean true
    private 'readable' =&gt; boolean true
    private 'writable' =&gt; boolean true
    private 'meta' =&gt; 
      array (size=6)
       'wrapper_type' =&gt; string 'PHP' (length=3)
        'stream_type' =&gt; string 'TEMP' (length=4)
        'mode' =&gt; string 'w+b' (length=3)
        'unread_bytes' =&gt; int 0
        'seekable' =&gt; boolean true
        'uri' =&gt; string 'php://temp' (length=10)
  </code></pre>
  
  <p>...instead of the response of 'cool' I was expecting.</p>
  
  <p>If I just var_dump <code>$client-&gt;sendRequest( $request )</code> I get a 200 OK, and the url is what I expect, <code>http://localhost:8000/test?access_token=foo</code>.</p>
  
  <p>I have another request, but only using <code>$client-&gt;post(...)</code> and it works fine without giving me the stream thing back.</p>
  
  <p>I've tried reading the stream using the example at the bottom (<a href="http://guzzle.readthedocs.org/en/latest/http-client/response.html" rel="nofollow noreferrer">http://guzzle.readthedocs.org/en/latest/http-client/response.html</a>) but it's telling me <code>feof</code> doesn't exist.</p>
  
  <p>Anyone have any idea what I'm missing or doing wrong here?</p>