OpenSwoole\Http\Request->getData

25.x is outdated, please check the latest version 26.x


Latest version: pecl install openswoole-26.2.0

Declaration

<?php OpenSwoole\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(OpenSwoole\Server\Request $request, OpenSwoole\Server\Response $response)
{
    var_dump($request->getData());
});
Last updated on February 28, 2026