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->getMethod(): string
None
Returns the current request HTTP method as a string
Gets the method of HTTP request, so it could be GET
, POST
, PUT
, DELETE
etc.
Since version v4.6.2
<?php
$server->on('Request', function(OpenSwoole\Server\Request $request, OpenSwoole\Server\Response $response)
{
var_dump($request->server['request_method']);
var_dump($request->getMethod());
});