pub fn fetch(
method: Method,
url: &str,
payload: Option<String>,
headers: Option<HashMap<&str, &str>>,
cl: impl FnMut(JsValue)
) -> Promise
Expand description
A wrapper over web_sys’s fetch api, to simplify code https://rustwasm.github.io/wasm-bindgen/examples/fetch.html