title: How can I POST JSON data to a remote server in Laravel 4?
body: <p>I am trying to HTTP POST JSON encoded data to a remote server.</p>
  
  <p>Using cURL, this would be done as</p>
  
  <pre><code>curl -X POST -H "Content-Type: application/json" -d '{"name":"Jeff"}' http://somesite/someuri
  </code></pre>
  
  <p>I can not find a Laravel approach to doing this.</p>
  
  <p>[ * * * UPDATE: My Solution * * * ] </p>
  
  <p>I ended up using PHP's HttpRequest</p>
  
  <pre><code>$httpRequest_OBJ = new httpRequest($server, HTTP_METH_POST, NULL);
  $httpRequest_OBJ-&gt;setBody($jsonEncodedData);
  $httpRequest_OBJ-&gt;setContentType('application/json');
  $result = $httpRequest_OBJ-&gt;send();
  $reply = $result-&gt;getBody();
  </code></pre>