WordPress\AiClientDependencies\Psr\Http\Message
MessageInterface::withAddedHeader
Return an instance with the specified header appended with the given value.
Existing values for the specified header will be maintained. The new value(s) will be appended to the existing list. If the header did not exist previously, it will be added.
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 header and/or value.
Method of the class: MessageInterface{}
No Hooks.
Returns
static.
Usage
$MessageInterface = new MessageInterface(); $MessageInterface->withAddedHeader( $name, $value ): MessageInterface;
- $name(string) (required)
- Case-insensitive header field name to add.
- $value(string|string[]) (required)
- Header value(s).
MessageInterface::withAddedHeader() MessageInterface::withAddedHeader code WP 7.0
public function withAddedHeader(string $name, $value): MessageInterface;