WordPress\AiClientDependencies\Psr\Http\Message

ServerRequestFactoryInterface::createServerRequestpublicWP 1.0

Create a new server request.

Note that server-params are taken precisely as given - no parsing/processing of the given values is performed, and, in particular, no attempt is made to determine the HTTP method or URI, which must be provided explicitly.

Method of the class: ServerRequestFactoryInterface{}

No Hooks.

Returns

ServerRequestInterface.

Usage

$ServerRequestFactoryInterface = new ServerRequestFactoryInterface();
$ServerRequestFactoryInterface->createServerRequest( $method, $uri, $serverParams ): ServerRequestInterface;
$method(string) (required)
The HTTP method associated with the request.
$uri(UriInterface|string) (required)
The URI associated with the request. If
php the value is a string, the factory MUST create a UriInterface instance based on it. .
$serverParams(array)
Array of SAPI parameters with which to seed
php the generated request instance. .
Default: []

ServerRequestFactoryInterface::createServerRequest() code WP 7.0

public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface;