Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Http\Request->getContent(): string
None
Original POST data request body
Get the raw POST body data from the HTTP request. This method is used to obtain the original POST data which isn't in the form of application/x-www-form-urlencoded
.
You can set the configuration http_parse_post
to control the analysis of POST data, some applications won't require the parsing of POST data, so this give you the ability to turn it off.
Since v4.5.0 this method is available
<?php
$server->on('Request', function(OpenSwoole\Server\Request $request, OpenSwoole\Server\Response $response)
{
var_dump($request->getContent());
});