diff --git a/examples/fetch/src/lib.rs b/examples/fetch/src/lib.rs index 53853f9b..20bfbc73 100644 --- a/examples/fetch/src/lib.rs +++ b/examples/fetch/src/lib.rs @@ -46,7 +46,7 @@ pub fn run() -> Promise { request_options.method("GET"); request_options.mode(RequestMode::Cors); - let req = Request::new_with_str_and_request_init("https://api.github.com/repos/rustwasm/wasm-bindgen/branches/master", &request_options).unwrap(); + let req = Request::new_with_str_and_init("https://api.github.com/repos/rustwasm/wasm-bindgen/branches/master", &request_options).unwrap(); // the RequestInit struct will eventually support setting headers, but that's missing right now req.headers().set("Accept", "application/vnd.github.v3+json").unwrap();