phasync
Request / create

Method

Request::create

Creates a request from a URI, deriving the request-target and Host header from it.

Description#

public static Request::create(
    string $method,
    Stringable|UriInterface|string $uri
): RequestInterface

This is the shape used by the PSR-17 request factory.

Parameters#

$method string
$uri Stringable|UriInterface|string
Full or relative URI

Return values#

RequestInterface