title: Get http headers from Guzzle Response Message as string
body: <p>After doing an http Request by using Guzzle, I want to print all the response headers. How can I do that?</p>
  <p>In the guzzle documentation it is stated that the <code>getHeaders()</code> method should be able to cast headers to string, but doing</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
      print $response-&gt;getHeaders();
  
  ?&gt;
  </code></pre>
  <p>does not work. It is also stated that in <code>GuzzleHttp\Message\Response</code> there should be a method called <code>getRawHeaders()</code> that should return the headers as a string, but php tells me that the method is undefined on the Response object. So, how can I accomplish my task of printing all the response headers as a string?</p>