title: Guzzle and Stack Exchange API, parsing error "JSON_ERROR_UTF8"
body: <p>I'm trying to consume the Stack Exchange API with <a href="http://guzzle.readthedocs.org/en/latest/" rel="nofollow noreferrer">Guzzle</a>. I am facing an issue where I can't get the JSON response back: it apparently fails when parsing it.</p>
  <p>Here is my code:</p>
  <pre><code>$client = new GuzzleHttp\Client();
  $parameters = ['pagesize'=&gt;'2','order'=&gt;'desc','sort'=&gt; 'activity','q'=&gt;'laravel eloquent','site'=&gt;'stackoverflow'];
  $response = $client-&gt;get('http://api.stackexchange.com/2.2/search/advanced',['query' =&gt; $parameters ]);
  </code></pre>
  <p>The resultant effective URL that Guzzle creates <a href="http://api.stackexchange.com/2.2/search/advanced?pagesize=2&amp;order=desc&amp;sort=activity&amp;q=laravel%20eloquent&amp;site=stackoverflow">is correct</a>: if you open the link in your browser you'll see that it works fine and returns the requested data.</p>
  <p>However, Guzzle fails with this error when trying to access the JSON with <code>$response-&gt;json()</code>:</p>
  <blockquote>
  <p>GuzzleHttp \ Exception \ ParseException<br />
  Unable to parse JSON data: JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded</p>
  </blockquote>
  <p>After reading the <a href="http://api.stackexchange.com/docs/compression">documentation</a> again, I believe that the request is compressed and I am not passing the appropriate content header. If this is so, can you please let me know which header I should be passing to get the correct response?</p>