blob: 102691f54945ff6843cfd20d0c8dc1959fc85ed0 [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
[
Constructor(optional HeadersInit init),
Exposed=(Window,Worker),
RaisesException=Constructor
] interface Headers {
[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>;
};