title: PHP Guzzle POST Request Returning Null
body: <p>I'm racking my brains over this - the request goes fine in Postman, but I can't access the body using Guzzle.</p>
  
  <pre><code>$client = new \GuzzleHttp\Client();
  
          $res = $client-&gt;request('POST',  'https://apitest.authorize.net/xml/v1/request.api', [
              'headers' =&gt; [
                  'Content-Type' =&gt; 'application/json',
              ],
              'body' =&gt; json_encode([
                  'createTransactionRequest' =&gt; [
                      'merchantAuthentication' =&gt; [
                          'name' =&gt; '88VuW****',
                          'transactionKey' =&gt; '2xyW8q65VZ*****'
                      ],
                      'transactionRequest' =&gt; [
                          'transactionType' =&gt; 'authCaptureTransaction',
                          'amount' =&gt; "5.00",
                          'payment' =&gt; [
                              'opaqueData' =&gt; [
                                  'dataDescriptor' =&gt; 'COMMON.ACCEPT.INAPP.PAYMENT',
                                  'dataValue' =&gt; $_POST['dataValue']
                              ]
                          ]
                      ]
                  ]
              ])
          ]);
  
          dd(json_decode($res-&gt;getBody()));
  </code></pre>
  
  <p>The above returns null - no errors, just null. The below is the same request in Postman, successful with a body.</p>
  
  <p><a href="https://i.stack.imgur.com/vcN6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vcN6R.png" alt="enter image description here"></a></p>
  
  <p>Any ideas would be really appreciated, thanks!</p>