Message
- class Firstred\PostNL\Util\Message
- Class Message.
Summary
Methods
Constants
- RFC7230_HEADER_REGEX = "\(^\(\[^\(\)<\>@,;:\\\\\\"/\[\\\\\]?=\{\}\\x01\- \]\+\+\):\[ \\t\]\*\+\(\(?:\[ \\t\]\*\+\[\!\-~\\x80\-\\xff\]\+\+\)\*\+\)\[ \\t\]\*\+\\r?\\n\)m"
- RFC7230_HEADER_FOLD_REGEX = "\(\\r?\\n\[ \\t\]\+\+\)"
Methods
- public static Firstred\PostNL\Util\Message::str($message)
- Returns the string representation of an HTTP message.
- Parameters:
$message (
Psr\Http\Message\MessageInterface) message to convert to a string
- Returns:
string
- public static Firstred\PostNL\Util\Message::parseResponse($message)
- Parses a response message string into a response object.
- Parameters:
$message (string) response message string
- Returns:
\Psr\Http\Message\ResponseInterface
- private static Firstred\PostNL\Util\Message::parseMessage($message)
- Parses an HTTP message into an associative array.The array contains the “start-line” key containing the start line ofthe message, “headers” key containing an associative array of headerarray values, and a “body” key containing the body of the message.
- Parameters:
$message (string) HTTP request or response to parse
- Returns:
array