mdref.json config
[mdref/mdref-http] / http / Message / setInfo.md
1 # http\Message http\Message::setInfo(string $http_info)
2
3 Set the complete message info, i.e. type and response resp. request information, at once.
4 See http\Message::getInfo().
5
6 ## Params:
7
8 * string $http_info
9 The message info (first line of an HTTP message).
10
11 ## Returns:
12
13 * http\Message, self.
14
15 ## Throws:
16
17 * http\Exception\InvalidArgumentException
18 * http\Exception\BadHeaderException
19
20 ## Format of the message info:
21
22 The message info looks similar to the following line for a response, see also http\Message::setResponseCode() and http\Message::setResponseStatus():
23
24 HTTP/1.1 200 Ok
25
26 The message info looks similar to the following line for a request, see also http\Message::setRequestMethod() and http\Message::setRequestUrl():
27
28 GET / HTTP/1.1
29
30 See http\Message::setHttpVersion().