Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / dom / webidl / Headers.webidl
blob1460dbb4ff3db48f80112647fc1b3276a03f66dd
1 /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6  *
7  * The origin of this IDL file is
8  * http://fetch.spec.whatwg.org/#headers-class
9  */
11 typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
13 enum HeadersGuardEnum {
14   "none",
15   "request",
16   "request-no-cors",
17   "response",
18   "immutable"
21 [Exposed=(Window,Worker)]
22 interface Headers {
23   [Throws]
24   constructor(optional HeadersInit init);
26   [Throws] undefined append(ByteString name, ByteString value);
27   [Throws] undefined delete(ByteString name);
28   [Throws] ByteString? get(ByteString name);
29   sequence<ByteString> getSetCookie();
30   [Throws] boolean has(ByteString name);
31   [Throws] undefined set(ByteString name, ByteString value);
32   iterable<ByteString, ByteString>;
34   // Used to test different guard states from mochitest.
35   // Note: Must be set prior to populating headers or will throw.
36   [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;