Returns a new instance with the specified header.
Parameters
$namestringrequired- The header name.
$valuestring|<span class="WordPressAiClientProvidersHttpCollectionslist”>WordPressAiClientProvidersHttpCollectionslistrequired- The header value(s).
Source
public function withHeader(string $name, $value): self
{
$new = clone $this;
$new->set($name, $value);
return $new;
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.