mdref.json config
[mdref/mdref-http] / http / Message / setResponseStatus.md
1 # http\Message http\Message::setResponseStatus(string $response_status)
2
3 Set the response status phrase.
4 See http\Message::getResponseStatus() and http\Message::setResponseCode().
5
6 ## Params:
7
8 * string $response_status
9 The status phrase.
10
11 ## Returns:
12
13 * http\Message, self.
14
15 ## Throws:
16
17 * http\Exception\InvalidArgumentException
18 * http\Exception\BadMethodCallException
19
20 ## Example:
21
22 <?php
23 $message = new http\Message;
24 $message->setType(http\Message::TYPE_RESPONSE);
25 $message->setResponseCode(200);
26 $message->setResponseStatus("Ok");
27 echo $message;
28 ?>
29
30 Yields:
31
32 HTTP/1.1 200 Ok