Message

class Firstred\PostNL\Util\Message
Class Message.

Summary

Methods

Constants

RFC7230_HEADER_REGEX = "\(^\(\[^\(\)<\>@,;:\\\\\\"/\[\\\\\]?=\{\}\\1\- \]\+\+\):\[ \\t\]\*\+\(\(?:\[ \\t\]\*\+\[\!\-~?\-?\]\+\+\)\*\+\)\[ \\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