mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Add the append method for the Headers API for the Fetch API
This commit will add the append method and associated helper functions, and introduce any necessary changes for it.
This commit is contained in:
parent
b36a3b2fee
commit
530b02790b
7 changed files with 348 additions and 1 deletions
22
components/script/dom/webidls/Headers.webidl
Normal file
22
components/script/dom/webidls/Headers.webidl
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://fetch.spec.whatwg.org/#headers-class
|
||||
|
||||
/* typedef (Headers or sequence<sequence<ByteString>>) HeadersInit; */
|
||||
|
||||
/* [Constructor(optional HeadersInit init),
|
||||
* Exposed=(Window,Worker)] */
|
||||
|
||||
interface Headers {
|
||||
[Throws]
|
||||
void append(ByteString name, ByteString value);
|
||||
};
|
||||
|
||||
/* void delete(ByteString name);
|
||||
* ByteString? get(ByteString name);
|
||||
* boolean has(ByteString name);
|
||||
* void set(ByteString name, ByteString value);
|
||||
* iterable<ByteString, ByteString>;
|
||||
* }; */
|
Loading…
Add table
Add a link
Reference in a new issue