Method
Response::withStatus
Returns a copy with the status $code, and $reasonPhrase, or the standard phrase for the code when it is ''.
Description#
public Response::withStatus(
$code,
$reasonPhrase = ''
): ResponseInterfaceParameters#
- $code
- $reasonPhrase = ''
Return values#
ResponseInterface
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | For a status code that is not an integer from 100 to 599 |