fetch APIView full source code or view the compiled example online
This example uses the fetch API to make an HTTP request to the GitHub API and then parses the resulting JSON.
Cargo.tomlThe Cargo.toml enables a number of features related to the fetch API and types used: Headers, Request, etc.
{{#include ../../../examples/fetch/Cargo.toml}}
src/lib.rs{{#include ../../../examples/fetch/src/lib.rs}}