An exception for terminatinating execution or to throw for unit testing.
The MessageInterface is the base interface that's used by both the RequestInterface and ResponseInter...
getBody()
Returns the message body, as it's internal representation.
getHttpVersion()
Returns the HTTP version.
addHeaders(array $headers)
Adds a new set of HTTP headers.
getBodyAsString()
Returns the body as a string.
setHttpVersion($version)
Sets the HTTP version.
removeHeader($name)
Removes a HTTP header.
getBodyAsStream()
Returns the body as a readable stream resource.
setBody($body)
Updates the body resource with a new stream.
setHeader($name, $value)
Updates a HTTP header.
getHeaderAsArray($name)
Returns a HTTP header as an array.
addHeader($name, $value)
Adds a HTTP header.
hasHeader($name)
Will return true or false, depending on if a HTTP header exists.
getHeader($name)
Returns a specific HTTP header, based on it's name.
getHeaders()
Returns all the HTTP headers as an array.
setHeaders(array $headers)
Sets a new set of HTTP headers.