title: Delphi TIdhttp Post JSON?
body: <p>Anybody getting JSON to work with TIdHttp ?</p>
  
  <p>The PHP always return NULL in the <code>$_POST</code>, am I doing anything wrong ?</p>
  
  <p>Delphi source:</p>
  
  <pre><code>http := TIdHttp.Create(nil);
  http.HandleRedirects := True;
  http.ReadTimeout := 5000;
  http.Request.ContentType := 'application/json';
  jsonToSend := TStringStream.Create('{"name":"Peter Pan"}');
  jsonToSend.Position := 0;
  Memo1.Lines.Text := http.Post('http://www.website.com/test.php', jsonToSend);
  jsonToSend.free;
  http.free;
  </code></pre>
  
  <p>PHP source:</p>
  
  <pre><code>&lt;?php
  $value = json_decode($_POST);
  var_dump($value);
  ?&gt;
  </code></pre>