title: Proper way to send (POST) xml with guzzle 6
body: <p>I want to perform a post with guzzle sending an xml file. I did not find an example.</p>
  
  <p>What I 've done so far is : </p>
  
  <pre><code>$xml2=simplexml_load_string($xml) or die("Error: Cannot create object");
  use    GuzzleHttp\Client;
  use GuzzleHttp\Psr7\Request;
  $client = new Client();
  //
  $request = new Request('POST', $uri, [ 'body'=&gt;$xml]);
  $response = $client-&gt;send($request);
   //
  //$code = $response-&gt;getStatusCode(); // 200
  //$reason = $response-&gt;getReasonPhrase(); // OK
   //
   echo $response-&gt;getBody();
  </code></pre>
  
  <p>No matter what I try I get back error -1 which means that xml is not valid.
  XML that I send passes online validation though and is valid %100 </p>
  
  <p>Please help.</p>