WordPress\AiClientDependencies\Psr\Http\Message

ResponseFactoryInterface::createResponsepublicWP 1.0

Create a new response.

Method of the class: ResponseFactoryInterface{}

No Hooks.

Returns

ResponseInterface.

Usage

$ResponseFactoryInterface = new ResponseFactoryInterface();
$ResponseFactoryInterface->createResponse( $code, $reasonPhrase ): ResponseInterface;
$code(int)
HTTP status code; defaults to 200.
Default: 200
$reasonPhrase(string)
Reason phrase to associate with status code
php in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification. .
Default: ''

ResponseFactoryInterface::createResponse() code WP 7.0

public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface;