Back to Wasm Bindgen

web-sys: Weather report

guide/src/examples/weather_report.md

0.2.120613 B
Original Source

web-sys: Weather report

View full source code

This example makes an HTTP request to OpenWeather API, parses response in JSON and render UI from that JSON. It also shows the usage of spawn_local function for handling asynchronous tasks.

Please add your api key in get_response() before running this application.

src/lib.rs

rust
{{#include ../../../examples/weather_report/src/lib.rs}}