Bumping manifests a=b2g-bump
[gecko.git] / dom / webidl / Headers.webidl
bloba240e37295a2d0317175906f3ff1c18ff4cfa925
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 (Headers or sequence<sequence<ByteString>> or MozMap<ByteString>) HeadersInit;
13 enum HeadersGuardEnum {
14   "none",
15   "request",
16   "request-no-cors",
17   "response",
18   "immutable"
21 [Constructor(optional HeadersInit init),
22  Exposed=(Window,Worker),
23  Func="mozilla::dom::Headers::PrefEnabled"]
24 interface Headers {
25   [Throws] void append(ByteString name, ByteString value);
26   [Throws] void delete(ByteString name);
27   [Throws] ByteString? get(ByteString name);
28   [Throws] sequence<ByteString> getAll(ByteString name);
29   [Throws] boolean has(ByteString name);
30   [Throws] void set(ByteString name, ByteString value);
32   // Used to test different guard states from mochitest.
33   // Note: Must be set prior to populating headers or will throw.
34   [ChromeOnly, SetterThrows] attribute HeadersGuardEnum guard;