title: PHPUnit - REST API testing
body: <p><br>
  I have REST API written in php, i want to test it with phpunit.<br></p>
  
  <p>I  wrote test like this, it works but response body was empty. I tested it with fiddler, it send response body.<br></p>
  
  <p>Sorry for my english.</p>
  
  <pre><code>class ProgrammerControllerTest extends PHPUnit_Framework_TestCase
  
  {
      public function testPOST()
      {   
  
      // create our http client (Guzzle)
      $client = new Guzzle\Http\Client();
      $response = $client-&gt;post("http://api.loc/v2/", array(
      'headers' =&gt; "User-Agent: Fiddler\r\n" .
                  "Host: api.loc\r\n".
                  "Content-Type: application/x-www-form-urlencoded\r\n".
                  "Content-Length: 34\r\n",
      'body'    =&gt; array('kle' =&gt;'sino','lat' =&gt; '41', 'long' =&gt; '69'),
      ));
      var_dump($response);
  
  
      }
  } 
  </code></pre>