mini\Http\Message\ServerRequest::withHeader()
Method
public
Signature
public function withHeader($name, $value): Psr\Http\Message\MessageInterface
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name |
mixed | required | Documentation missing |
$value |
mixed | required | Documentation missing |
Returns
Psr\Http\Message\MessageInterface
Documentation
Return an instance with the provided value replacing the specified header.
While header names are case-insensitive, the casing of the header will be preserved by this function, and returned from getHeaders().
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new and/or updated header and value.