diff options
Diffstat (limited to 'components/script/fetch.rs')
-rw-r--r-- | components/script/fetch.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/fetch.rs b/components/script/fetch.rs index ed1a66fc683..9ba9fbf59cb 100644 --- a/components/script/fetch.rs +++ b/components/script/fetch.rs @@ -2,10 +2,10 @@ * 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/. */ +use dom::bindings::codegen::Bindings::RequestBinding::RequestInfo; use dom::bindings::codegen::Bindings::RequestBinding::RequestInit; use dom::bindings::codegen::Bindings::ResponseBinding::ResponseBinding::ResponseMethods; use dom::bindings::codegen::Bindings::ResponseBinding::ResponseType as DOMResponseType; -use dom::bindings::codegen::UnionTypes::RequestOrUSVString; use dom::bindings::error::Error; use dom::bindings::js::Root; use dom::bindings::refcounted::{Trusted, TrustedPromise}; @@ -62,12 +62,13 @@ fn request_init_from_request(request: NetTraitsRequest) -> NetTraitsRequestInit referrer_policy: request.referrer_policy.get(), pipeline_id: request.pipeline_id.get(), redirect_mode: request.redirect_mode.get(), + ..NetTraitsRequestInit::default() } } // https://fetch.spec.whatwg.org/#fetch-method #[allow(unrooted_must_root)] -pub fn Fetch(global: &GlobalScope, input: RequestOrUSVString, init: &RequestInit) -> Rc<Promise> { +pub fn Fetch(global: &GlobalScope, input: RequestInfo, init: &RequestInit) -> Rc<Promise> { let core_resource_thread = global.core_resource_thread(); // Step 1 |