mdref.json config
[mdref/mdref-http] / http / Message / setResponseCode.md
1 # http\Message http\Message::setResponseCode(int $response_code[, bool $strict = true])
2
3 Set the response status code.
4 See http\Message::getResponseCode() and http\Message::setResponseStatus().
5
6 > ***NOTE:***
7 > This method also resets the response status phrase to the default for that code.
8
9 ## Params:
10
11 * int $response_code
12 The response code.
13 * Optional bool $strict = true
14 Whether to check that the response code is between 100 and 599 inclusive.
15
16 ## Returns:
17
18 * http\Message, self.
19
20 ## Throws:
21
22 * http\Exception\InvalidArgumentException
23 * http\Exception\BadMethodCallException