Sha256: 184bf64d58820b032a80c738050e7b2cd0042eb722f61c7e8a3c531239f72db2

Contents?: true

Size: 652 Bytes

Versions: 19

Compression:

Stored size: 652 Bytes

Contents

# web-sys: Weather report

[View full source code][code] or [view the compiled example online][online]

[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/weather_report/
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/weather_report

This example makes an HTTP request to [OpenWeather API](https://openweathermap.org/),
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}}
```

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-14.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-14.0.3 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-14.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-14.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-13.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-12.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-12.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-11.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-10.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-10.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-9.0.4 ./ext/cargo-vendor/wasm-bindgen-0.2.87/guide/src/examples/weather_report.md
wasmtime-9.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.86/guide/src/examples/weather_report.md
wasmtime-8.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/examples/weather_report.md
wasmtime-7.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/examples/weather_report.md
wasmtime-6.0.1 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/examples/weather_report.md
wasmtime-6.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.84/guide/src/examples/weather_report.md
wasmtime-5.0.0 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/examples/weather_report.md
wasmtime-0.4.1 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/examples/weather_report.md
wasmtime-0.4.0 ./ext/cargo-vendor/wasm-bindgen-0.2.83/guide/src/examples/weather_report.md