WordPress\AiClientDependencies\Nyholm\Psr7\Factory

Psr17Factory::createResponsepublicWP 1.0

Method of the class: Psr17Factory{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Psr17Factory = new Psr17Factory();
$Psr17Factory->createResponse( $code, $reasonPhrase ): ResponseInterface;
$code(int)
.
Default: 200
$reasonPhrase(string)
.
Default: ''

Psr17Factory::createResponse() code WP 7.0

public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
{
    if (2 > \func_num_args()) {
        // This will make the Response class to use a custom reasonPhrase
        $reasonPhrase = null;
    }
    return new Response($code, [], null, '1.1', $reasonPhrase);
}