title: Failed to post data using Guzzle 6
body: <p>I've tried dozens of times to debug this, but I can't find where my error code. The problem is simple, I just want to post data with the application/json format</p>
  
  <pre><code>$this-&gt;client = new GuzzleHttp\Client(['base_uri' =&gt;  'https://myendpointapi.com/']);
  $headers =  [
      'Authorization' =&gt; $auth,
      'Accept'=&gt;'application/json',
      'Content-Type' =&gt; $contentTypes
  ];
  $url = "my-service";
  $data = ["foo" =&gt; "bar"];
  $this-&gt;client-&gt;send('POST',$url,["headers" =&gt; $headers, "json" =&gt; $data ]);
  </code></pre>
  
  <p>but the error I cant post $data, the response inform me no data send by me. I am also try to change $data value like </p>
  
  <pre><code>$data = array(["foo" =&gt; "bar"])
  </code></pre>
  
  <p>or change the format to multipart request (application/x-www-form-urlencoded) but the response keep same. I don't know why my code is not send the data.</p>