title: React PHP get POST data
body: <p>I'm trying to run a simple Web app over a ReactPHP Web server, but I can't figure out where to get POST data coming from an HTML form. The server is defined as:</p>
  
  <pre><code>include 'vendor/autoload.php';
  
  register_shutdown_function(function() {
      echo implode(PHP_EOL, error_get_last()), PHP_EOL;
  });
  
  $loop = React\EventLoop\Factory::create();
  $socket = new React\Socket\Server($loop);
  $http = new React\Http\Server($socket);
  $http-&gt;on('request', function(React\Http\Request $request, React\Http\Response $response) {
      print_r($request);
      $response-&gt;writeHead(200, array('Content-type' =&gt; 'text/html'));
      $response-&gt;end('&lt;form method="POST"&gt;&lt;input type="text" name="text"&gt;&lt;input type="submit" name="submit" value="Submit"&gt;&lt;/form&gt;');
  });
  $socket-&gt;listen(9000);
  $loop-&gt;run();
  </code></pre>
  
  <p>When I post some string using the HTML form, the <code>$request</code> object, when printed on the console, looks like:</p>
  
  <pre><code>React\Http\Request Object
  (
      [readable:React\Http\Request:private] =&gt; 1
      [method:React\Http\Request:private] =&gt; POST
      [path:React\Http\Request:private] =&gt; /
      [query:React\Http\Request:private] =&gt; Array
          (
          )
  
      [httpVersion:React\Http\Request:private] =&gt; 1.1
      [headers:React\Http\Request:private] =&gt; Array
          (
              [User-Agent] =&gt; Opera/9.80 (X11; Linux i686) Presto/2.12.388 Version/12.16
              [Host] =&gt; localhost:9000
              [Accept] =&gt; text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
              [Accept-Language] =&gt; it,en;q=0.9
              [Accept-Encoding] =&gt; gzip, deflate
              [Referer] =&gt; http://localhost:9000/
              [Connection] =&gt; Keep-Alive
              [Content-Length] =&gt; 24
              [Content-Type] =&gt; application/x-www-form-urlencoded
          )
  
      [listeners:protected] =&gt; Array
          (
          )
  
  )
  </code></pre>
  
  <p>Here I can't find my data anywhere. I thought it should be located in the <code>query</code> property, but it's empty.</p>
  
  <p>When I make GET requests, instead, data passed in the querystring can be found inside the <code>query</code> property of the <code>$request</code> object.</p>
  
  <p>So, where can I find data passed with POST requests?</p>