|
static | bodySummary (MessageInterface $message, int $truncateAt=120) |
| Get a short summary of the message body.
|
|
static | parseMessage (string $message) |
| Parses an HTTP message into an associative array.
|
|
static | parseRequest (string $message) |
| Parses a request message string into a request object.
|
|
static | parseRequestUri (string $path, array $headers) |
| Constructs a URI for an HTTP request message.
|
|
static | parseResponse (string $message) |
| Parses a response message string into a response object.
|
|
static | rewindBody (MessageInterface $message) |
| Attempts to rewind a message body and throws an exception on failure.
|
|
static | toString (MessageInterface $message) |
|
◆ bodySummary()
static GuzzleHttp\Psr7\Message::bodySummary |
( |
MessageInterface | $message, |
|
|
int | $truncateAt = 120 ) |
|
static |
Get a short summary of the message body.
Will return null
if the response is not printable.
- Parameters
-
MessageInterface | $message | The message to get the body summary |
int | $truncateAt | The maximum allowed size of the summary |
◆ parseMessage()
static GuzzleHttp\Psr7\Message::parseMessage |
( |
string | $message | ) |
|
|
static |
Parses an HTTP message into an associative array.
The array contains the "start-line" key containing the start line of the message, "headers" key containing an associative array of header array values, and a "body" key containing the body of the message.
- Parameters
-
string | $message | HTTP request or response to parse. |
◆ parseRequest()
static GuzzleHttp\Psr7\Message::parseRequest |
( |
string | $message | ) |
|
|
static |
Parses a request message string into a request object.
- Parameters
-
string | $message | Request message string. |
◆ parseRequestUri()
static GuzzleHttp\Psr7\Message::parseRequestUri |
( |
string | $path, |
|
|
array | $headers ) |
|
static |
Constructs a URI for an HTTP request message.
- Parameters
-
string | $path | Path from the start-line |
array | $headers | Array of headers (each value an array). |
◆ parseResponse()
static GuzzleHttp\Psr7\Message::parseResponse |
( |
string | $message | ) |
|
|
static |
Parses a response message string into a response object.
- Parameters
-
string | $message | Response message string. |
◆ rewindBody()
Attempts to rewind a message body and throws an exception on failure.
The body of the message will only be rewound if a call to tell()
returns a value other than 0
.
- Parameters
-
MessageInterface | $message | Message to rewind |
- Exceptions
-
The documentation for this class was generated from the following file:
- lib/guzzlehttp/psr7/src/Message.php