mini\Http\Message\Request::withMethod() Method

public

Signature

public function withMethod(string $method): Psr\Http\Message\RequestInterface

Parameters

Name Type Default Description
$method string required Documentation missing

Returns

Psr\Http\Message\RequestInterface

Documentation

Return an instance with the provided HTTP method.

While HTTP method names are typically all uppercase characters, HTTP method names are case-sensitive and thus implementations SHOULD NOT modify the given string.

This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the changed request method.

Source

src/Http/Message/RequestTrait.php:120-124