mini\Http\Message\Request
class
Documentation
Representation of an outgoing, client-side request.
Per the HTTP specification, this interface includes properties for each of the following:
- Protocol version
- HTTP method
- URI
- Headers
- Message body
During construction, implementations MUST attempt to set the Host header from a provided URI if no Host header is provided.
Requests are considered immutable; all methods that might change state MUST be implemented such that they retain the internal state of the current message and return an instance that contains the changed state.
Inheritance
Implements:
Psr\Http\Message\RequestInterface
Psr\Http\Message\MessageInterface
Uses Traits:
mini\Http\Message\RequestTrait
Properties (7)
string $method
string $requestTarget
Psr\Http\Message\UriInterface $uriOverride
string $protocolVersion
Psr\Http\Message\StreamInterface $body
array $headers
array $headerCases
Methods (23)
Configure the request.
Create a Request from a URI
Documentation missing
Configure the request.
Retrieves the message's request target.
Return an instance with the specific request-target.
Retrieves the HTTP method of the request.
Return an instance with the provided HTTP method.
Retrieves the URI instance.
Returns an instance with the provided URI.
Get the query string from the request target.
Configure the message trait.
Retrieves the HTTP protocol version as a string.
Return an instance with the specified HTTP protocol version.
Get message headers
Checks if a header exists by the given case-insensitive name.
Retrieves a message header value by the given case-insensitive name.
Retrieves a comma-separated string of the values for a single header.
Return an instance with the provided value replacing the specified header.
Return an instance with the specified header appended with the given value.
Return an instance without the specified header.
Gets the body of the message.
Return an instance with the specified message body.