Class ResponseFactory
Factory class for creating response instances.
Namespace: Cake\Http
Method Summary
-
createResponse() public
Create a new response.
Method Detail
createResponse() ΒΆ public
createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
Create a new response.
Parameters
-
int
$code optional The HTTP status code. Defaults to 200.
-
string
$reasonPhrase optional The reason phrase to associate with the status code in the generated response. If none is provided, implementations MAY use the defaults as suggested in the HTTP specification.
Returns
ResponseInterface