Swoole\Http\Request->getData

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 <?php

$server->on('Request', function(Swoole/Server/Request $request, Swoole/Server/Response $response) { var_dump($request->getData()); }); ```