WordPress\AiClient\Providers\Http\Collections

HeadersCollection::withHeaderpublicWP 0.1.0

Returns a new instance with the specified header.

Метод класса: HeadersCollection{}

Хуков нет.

Возвращает

self. A new instance with the header.

Использование

$HeadersCollection = new HeadersCollection();
$HeadersCollection->withHeader( $name, $value ): self;
$name(строка) (обязательный)
The header name.
$value(строка|list) (обязательный)
The header value(s).

Список изменений

С версии 0.1.0 Введена.

Код HeadersCollection::withHeader() WP 7.1.2

public function withHeader(string $name, $value): self
{
    $new = clone $this;
    $new->set($name, $value);
    return $new;
}