1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Request , typescript_type = "Request")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `Request` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
13     pub type Request;
14     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = method)]
15     #[doc = "Getter for the `method` field of this object."]
16     #[doc = ""]
17     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/method)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
method(this: &Request) -> String20     pub fn method(this: &Request) -> String;
21     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = url)]
22     #[doc = "Getter for the `url` field of this object."]
23     #[doc = ""]
24     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/url)"]
25     #[doc = ""]
26     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
url(this: &Request) -> String27     pub fn url(this: &Request) -> String;
28     #[cfg(feature = "Headers")]
29     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = headers)]
30     #[doc = "Getter for the `headers` field of this object."]
31     #[doc = ""]
32     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/headers)"]
33     #[doc = ""]
34     #[doc = "*This API requires the following crate features to be activated: `Headers`, `Request`*"]
headers(this: &Request) -> Headers35     pub fn headers(this: &Request) -> Headers;
36     #[cfg(feature = "RequestDestination")]
37     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = destination)]
38     #[doc = "Getter for the `destination` field of this object."]
39     #[doc = ""]
40     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/destination)"]
41     #[doc = ""]
42     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestDestination`*"]
destination(this: &Request) -> RequestDestination43     pub fn destination(this: &Request) -> RequestDestination;
44     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = referrer)]
45     #[doc = "Getter for the `referrer` field of this object."]
46     #[doc = ""]
47     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/referrer)"]
48     #[doc = ""]
49     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
referrer(this: &Request) -> String50     pub fn referrer(this: &Request) -> String;
51     #[cfg(feature = "ReferrerPolicy")]
52     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = referrerPolicy)]
53     #[doc = "Getter for the `referrerPolicy` field of this object."]
54     #[doc = ""]
55     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/referrerPolicy)"]
56     #[doc = ""]
57     #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `Request`*"]
referrer_policy(this: &Request) -> ReferrerPolicy58     pub fn referrer_policy(this: &Request) -> ReferrerPolicy;
59     #[cfg(feature = "RequestMode")]
60     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = mode)]
61     #[doc = "Getter for the `mode` field of this object."]
62     #[doc = ""]
63     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/mode)"]
64     #[doc = ""]
65     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestMode`*"]
mode(this: &Request) -> RequestMode66     pub fn mode(this: &Request) -> RequestMode;
67     #[cfg(feature = "RequestCredentials")]
68     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = credentials)]
69     #[doc = "Getter for the `credentials` field of this object."]
70     #[doc = ""]
71     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials)"]
72     #[doc = ""]
73     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestCredentials`*"]
credentials(this: &Request) -> RequestCredentials74     pub fn credentials(this: &Request) -> RequestCredentials;
75     #[cfg(feature = "RequestCache")]
76     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = cache)]
77     #[doc = "Getter for the `cache` field of this object."]
78     #[doc = ""]
79     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/cache)"]
80     #[doc = ""]
81     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestCache`*"]
cache(this: &Request) -> RequestCache82     pub fn cache(this: &Request) -> RequestCache;
83     #[cfg(feature = "RequestRedirect")]
84     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = redirect)]
85     #[doc = "Getter for the `redirect` field of this object."]
86     #[doc = ""]
87     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/redirect)"]
88     #[doc = ""]
89     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestRedirect`*"]
redirect(this: &Request) -> RequestRedirect90     pub fn redirect(this: &Request) -> RequestRedirect;
91     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = integrity)]
92     #[doc = "Getter for the `integrity` field of this object."]
93     #[doc = ""]
94     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/integrity)"]
95     #[doc = ""]
96     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
integrity(this: &Request) -> String97     pub fn integrity(this: &Request) -> String;
98     #[cfg(feature = "AbortSignal")]
99     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = signal)]
100     #[doc = "Getter for the `signal` field of this object."]
101     #[doc = ""]
102     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/signal)"]
103     #[doc = ""]
104     #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `Request`*"]
signal(this: &Request) -> AbortSignal105     pub fn signal(this: &Request) -> AbortSignal;
106     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = bodyUsed)]
107     #[doc = "Getter for the `bodyUsed` field of this object."]
108     #[doc = ""]
109     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/bodyUsed)"]
110     #[doc = ""]
111     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
body_used(this: &Request) -> bool112     pub fn body_used(this: &Request) -> bool;
113     #[cfg(feature = "ReadableStream")]
114     # [wasm_bindgen (structural , method , getter , js_class = "Request" , js_name = body)]
115     #[doc = "Getter for the `body` field of this object."]
116     #[doc = ""]
117     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/body)"]
118     #[doc = ""]
119     #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `Request`*"]
body(this: &Request) -> Option<ReadableStream>120     pub fn body(this: &Request) -> Option<ReadableStream>;
121     #[wasm_bindgen(catch, constructor, js_class = "Request")]
122     #[doc = "The `new Request(..)` constructor, creating a new instance of `Request`."]
123     #[doc = ""]
124     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request)"]
125     #[doc = ""]
126     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
new_with_request(input: &Request) -> Result<Request, JsValue>127     pub fn new_with_request(input: &Request) -> Result<Request, JsValue>;
128     #[wasm_bindgen(catch, constructor, js_class = "Request")]
129     #[doc = "The `new Request(..)` constructor, creating a new instance of `Request`."]
130     #[doc = ""]
131     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request)"]
132     #[doc = ""]
133     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
new_with_str(input: &str) -> Result<Request, JsValue>134     pub fn new_with_str(input: &str) -> Result<Request, JsValue>;
135     #[cfg(feature = "RequestInit")]
136     #[wasm_bindgen(catch, constructor, js_class = "Request")]
137     #[doc = "The `new Request(..)` constructor, creating a new instance of `Request`."]
138     #[doc = ""]
139     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request)"]
140     #[doc = ""]
141     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestInit`*"]
new_with_request_and_init( input: &Request, init: &RequestInit, ) -> Result<Request, JsValue>142     pub fn new_with_request_and_init(
143         input: &Request,
144         init: &RequestInit,
145     ) -> Result<Request, JsValue>;
146     #[cfg(feature = "RequestInit")]
147     #[wasm_bindgen(catch, constructor, js_class = "Request")]
148     #[doc = "The `new Request(..)` constructor, creating a new instance of `Request`."]
149     #[doc = ""]
150     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request)"]
151     #[doc = ""]
152     #[doc = "*This API requires the following crate features to be activated: `Request`, `RequestInit`*"]
new_with_str_and_init(input: &str, init: &RequestInit) -> Result<Request, JsValue>153     pub fn new_with_str_and_init(input: &str, init: &RequestInit) -> Result<Request, JsValue>;
154     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = clone)]
155     #[doc = "The `clone()` method."]
156     #[doc = ""]
157     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/clone)"]
158     #[doc = ""]
159     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
clone(this: &Request) -> Result<Request, JsValue>160     pub fn clone(this: &Request) -> Result<Request, JsValue>;
161     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = arrayBuffer)]
162     #[doc = "The `arrayBuffer()` method."]
163     #[doc = ""]
164     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/arrayBuffer)"]
165     #[doc = ""]
166     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
array_buffer(this: &Request) -> Result<::js_sys::Promise, JsValue>167     pub fn array_buffer(this: &Request) -> Result<::js_sys::Promise, JsValue>;
168     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = blob)]
169     #[doc = "The `blob()` method."]
170     #[doc = ""]
171     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/blob)"]
172     #[doc = ""]
173     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
blob(this: &Request) -> Result<::js_sys::Promise, JsValue>174     pub fn blob(this: &Request) -> Result<::js_sys::Promise, JsValue>;
175     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = formData)]
176     #[doc = "The `formData()` method."]
177     #[doc = ""]
178     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/formData)"]
179     #[doc = ""]
180     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
form_data(this: &Request) -> Result<::js_sys::Promise, JsValue>181     pub fn form_data(this: &Request) -> Result<::js_sys::Promise, JsValue>;
182     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = json)]
183     #[doc = "The `json()` method."]
184     #[doc = ""]
185     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/json)"]
186     #[doc = ""]
187     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
json(this: &Request) -> Result<::js_sys::Promise, JsValue>188     pub fn json(this: &Request) -> Result<::js_sys::Promise, JsValue>;
189     # [wasm_bindgen (catch , method , structural , js_class = "Request" , js_name = text)]
190     #[doc = "The `text()` method."]
191     #[doc = ""]
192     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request/text)"]
193     #[doc = ""]
194     #[doc = "*This API requires the following crate features to be activated: `Request`*"]
text(this: &Request) -> Result<::js_sys::Promise, JsValue>195     pub fn text(this: &Request) -> Result<::js_sys::Promise, JsValue>;
196 }
197