message
[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 ## Warnings:
16
17 * E_MALFORMED_HEADERS, if the message information could not be parsed.
18
19 ## Format of the message info:
20
21 The message info looks similar to the following line for a response, see also http\Message::setResponseCode() and http\Message::setResponseStatus():
22
23 HTTP/1.1 200 Ok
24
25 The message info looks similar to the following line for a request, see also http\Message::setRequestMethod() and http\Message::setRequestUrl():
26
27 GET / HTTP/1.1
28
29 See http\Message::setHttpVersion().