blob: 5b0388d8cc7d5563434993009ea0ade85a9fa6a2 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://fetch.spec.whatwg.org/#typedefdef-headersinit
typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
// https://fetch.spec.whatwg.org/#headers-class
[
Exposed=(Window,Worker)
] interface Headers {
[RaisesException] constructor(optional HeadersInit init);
[RaisesException] void append(ByteString name, ByteString value);
[ImplementedAs=remove, RaisesException] void delete(ByteString key);
[RaisesException] ByteString? get(ByteString key);
[RaisesException] boolean has(ByteString key);
[RaisesException] void set(ByteString key, ByteString value);
iterable<ByteString, ByteString>;
};