WordPress\AiClientDependencies\Psr\Http\Message
MessageInterface::withHeader
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.
Method of the class: MessageInterface{}
No Hooks.
Returns
static.
Usage
$MessageInterface = new MessageInterface(); $MessageInterface->withHeader( $name, $value ): MessageInterface;
- $name(string) (required)
- Case-insensitive header field name.
- $value(string|string[]) (required)
- Header value(s).
MessageInterface::withHeader() MessageInterface::withHeader code WP 7.0
public function withHeader(string $name, $value): MessageInterface;