Methods |
public
|
__construct(string $method, ?URI $uri = null, array $headers = [], string|null $body = null, string $version = '1.1')
|
#
|
public
|
getMethod(bool $upper = false): string
Get the request method.
Deprecated
The $upper functionality will be removed and this will revert to its PSR-7 equivalent
Parameters
$upper |
Whether to return in upper or lower case.
|
Overriden by
Implements
|
#
|
public
|
setMethod(string $method): $this
Sets the request method. Used when spoofing the request.
Sets the request method. Used when spoofing the request.
Deprecated
Use withMethod() instead for immutability
Overriden by
|
#
|
public
|
withMethod(string $method): static
Returns an instance with the specified method.
Returns an instance with the specified method.
Parameters
$method |
Case-sensitive method.
|
Overriden by
Implements
|
#
|
public
|
getUri(): URI|null
Retrieves the URI instance.
Retrieves the URI instance.
Overriden by
Implements
|
#
|
public
|
withUri(URI $uri, bool $preserveHost = false): static
Returns an instance with the provided URI.
Returns an instance with the provided URI.
Parameters
$uri |
New request URI to use.
|
$preserveHost |
Preserve the original state of the Host header.
|
Implements
|
#
|