An exception for terminatinating execution or to throw for unit testing.
HTTP messages consist of requests from a client to a server and responses from a server to a client.
getHeaderLine($name)
Retrieves a comma-separated string of the values for a single header.
getHeader($name)
Retrieves a message header value by the given case-insensitive name.
withBody(StreamInterface $body)
Return an instance with the specified message body.
withHeader($name, $value)
Return an instance with the provided value replacing the specified header.
getHeaders()
Retrieves all message header values.
withProtocolVersion($version)
Return an instance with the specified HTTP protocol version.
getBody()
Gets the body of the message.
withoutHeader($name)
Return an instance without the specified header.
hasHeader($name)
Checks if a header exists by the given case-insensitive name.
withAddedHeader($name, $value)
Return an instance with the specified header appended with the given value.
getProtocolVersion()
Retrieves the HTTP protocol version as a string.