1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Headers , typescript_type = "Headers")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Headers` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
14 pub type Headers;
15 #[wasm_bindgen(catch, constructor, js_class = "Headers")]
16 #[doc = "The `new Headers(..)` constructor, creating a new instance of `Headers`."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
21 pub fn new() -> Result<Headers, JsValue>;
22 #[wasm_bindgen(catch, constructor, js_class = "Headers")]
23 #[doc = "The `new Headers(..)` constructor, creating a new instance of `Headers`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
28 pub fn new_with_headers(init: &Headers) -> Result<Headers, JsValue>;
29 #[wasm_bindgen(catch, constructor, js_class = "Headers")]
30 #[doc = "The `new Headers(..)` constructor, creating a new instance of `Headers`."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
35 pub fn new_with_str_sequence_sequence(
36 init: &::wasm_bindgen::JsValue,
37 ) -> Result<Headers, JsValue>;
38 # [wasm_bindgen (catch , method , structural , js_class = "Headers" , js_name = append)]
39 #[doc = "The `append()` method."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/append)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
44 pub fn append(this: &Headers, name: &str, value: &str) -> Result<(), JsValue>;
45 # [wasm_bindgen (catch , method , structural , js_class = "Headers" , js_name = delete)]
46 #[doc = "The `delete()` method."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/delete)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
51 pub fn delete(this: &Headers, name: &str) -> Result<(), JsValue>;
52 # [wasm_bindgen (catch , method , structural , js_class = "Headers" , js_name = get)]
53 #[doc = "The `get()` method."]
54 #[doc = ""]
55 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/get)"]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
58 pub fn get(this: &Headers, name: &str) -> Result<Option<String>, JsValue>;
59 # [wasm_bindgen (catch , method , structural , js_class = "Headers" , js_name = has)]
60 #[doc = "The `has()` method."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/has)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
65 pub fn has(this: &Headers, name: &str) -> Result<bool, JsValue>;
66 # [wasm_bindgen (catch , method , structural , js_class = "Headers" , js_name = set)]
67 #[doc = "The `set()` method."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers/set)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `Headers`*"]
72 pub fn set(this: &Headers, name: &str, value: &str) -> Result<(), JsValue>;
73}
74