Laravel GuzzleHTTP XML Response to JSON
<p>I'm making a call the NameCheap's API and they return a XML response.</p>

<p>When trying to output this, I get the response NULL.</p>

<p>Hitting the same API but with the Google Extension POSTMAN I get the results I'm after, am I doing something wrong with the response?</p>

<pre><code>public function testCheck($domains){

        $client = new Client();

        $res = $client-&gt;request('GET', 'https://api.namecheap.com/xml.response?ApiUser=(username)&amp;ApiKey=(apikey)&amp;UserName(username)&amp;ClientIp=(ip)&amp;Command=namecheap.domains.check&amp;DomainList=' . $domains);

        $data = json_decode($res-&gt;getBody());

        dd($data);

    }
</code></pre>

<p>I get back</p>

<pre><code>null
</code></pre>