Skip to content

Commit

Permalink
wasm: stop using deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Aug 13, 2024
1 parent 5e98f0a commit b7151f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/rune-wasm/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ struct Error;

/// Perform a `get` request.
async fn get(url: Ref<str>) -> Result<Response, Error> {
let mut opts = web_sys::RequestInit::new();
opts.method("GET");
opts.mode(web_sys::RequestMode::Cors);
let opts = web_sys::RequestInit::new();
opts.set_method("GET");
opts.set_mode(web_sys::RequestMode::Cors);
let request = web_sys::Request::new_with_str(&url);
let window = web_sys::window().ok_or(Error)?;
let request = request.map_err(|_| Error)?;
Expand Down

0 comments on commit b7151f8

Please sign in to comment.