message parser
[mdref/mdref-http] / http / Message.md
1 # class http\Message implements Countable, Serializable, Iterator
2
3 The message class builds the foundation for any request and response message.
4 See http\Client\Request and http\Client\Response, as well as http\Env\Request and http\Env\Response.
5
6 ## Constants:
7
8 * TYPE_NONE
9 No specific type of message.
10 * TYPE_REQUEST
11 A request message.
12 * TYPE_RESPONSE
13 A response message.
14
15 ## Properties:
16
17 * protected int $type = http\Message::TYPE_NONE
18 The message type. See http\Message::TYPE_* constants.
19 * protected http\Message\Body $body = NULL
20 The message's body.
21 * protected string $requestMethod = ""
22 The request method if the message is of type request.
23 * protected string $requestUrl = ""
24 The request url if the message is of type request.
25 * protected string $responseStatus = ""
26 The respose status phrase if the message is of type response.
27 * protected int $responseCode = 0
28 The response code if the message is of type response.
29 * protected string $httpVersion = NULL
30 A custom HTTP protocol version.
31 * protected array $headers = NULL
32 Any message headers.
33 * protected http\Message $parentMessage
34 Any parent message.
35