2023-10-25 17:27:19 +02:00
|
|
|
// https://fetch.spec.whatwg.org/#typedefdef-headersinit
|
2022-07-19 00:19:24 +01:00
|
|
|
typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) HeadersInit;
|
|
|
|
|
|
2023-10-25 17:27:19 +02:00
|
|
|
// https://fetch.spec.whatwg.org/#headers
|
2023-09-03 02:00:01 +12:00
|
|
|
[Exposed=(Window,Worker)]
|
2022-07-19 00:19:24 +01:00
|
|
|
interface Headers {
|
|
|
|
|
constructor(optional HeadersInit init);
|
|
|
|
|
|
|
|
|
|
undefined append(ByteString name, ByteString value);
|
|
|
|
|
undefined delete(ByteString name);
|
|
|
|
|
ByteString? get(ByteString name);
|
2023-02-10 22:02:18 +00:00
|
|
|
sequence<ByteString> getSetCookie();
|
2022-07-19 00:19:24 +01:00
|
|
|
boolean has(ByteString name);
|
|
|
|
|
undefined set(ByteString name, ByteString value);
|
|
|
|
|
iterable<ByteString, ByteString>;
|
|
|
|
|
};
|