MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_response

Method get_response

crates/wasm/src/browser_module.rs:33–39  ·  view source on GitHub ↗
(&self, response: &web_sys::Response)

Source from the content-addressed store, hash-verified

31 }
32 }
33 fn get_response(&self, response: &web_sys::Response) -> Result<Promise, JsValue> {
34 match self {
35 FetchResponseFormat::Json => response.json(),
36 FetchResponseFormat::Text => response.text(),
37 FetchResponseFormat::ArrayBuffer => response.array_buffer(),
38 }
39 }
40 }
41
42 #[derive(FromArgs)]

Callers 1

fetchFunction · 0.80

Calls 1

jsonMethod · 0.45

Tested by

no test coverage detected