Debian Codegraph @

.cargo/vendor/wasm-bindgen/guide/src/examples/weather_report.md

raw
1 # web-sys: Weather report
2
3 [View full source code][code]
4
5 [online]: https://rustwasm.github.io/wasm-bindgen/exbuild/weather_report/
6 [code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/weather_report
7
8 This example makes an HTTP request to [OpenWeather API](https://openweathermap.org/),
9 parses response in JSON and render UI from that JSON. It also shows the usage of
10 `spawn_local` function for handling asynchronous tasks.
11
12 Please add your api key in *get_response()* before running this application.
13
14 ## `src/lib.rs`
15
16 ```rust
17 {{#include ../../../examples/weather_report/src/lib.rs}}
18 ```