Swoole\Http\Request->getData

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Http\Request->getData(): string

Parameters

None

Return

A complete string of the whole HTTP message, header and body

Description

Get the raw whole HTTP request data, includes the headers and POST body message from the request sent to the server.

Example


<?php

$server->on('Request', function(Swoole/Server/Request $request, Swoole/Server/Response $response)
{
    var_dump($request->getData());
});
Last updated on September 16, 2022