Initial example for the Fetch API

This commit is contained in:
Andrew Chin
2018-08-18 17:20:42 -04:00
parent 9c6225fd80
commit 9d7c0af08f
10 changed files with 158 additions and 0 deletions

11
examples/fetch/index.js Normal file
View File

@ -0,0 +1,11 @@
const rust = import('./fetch');
rust.then(m => {
m.run().then((data) => {
console.log(data);
console.log("The latest commit to the wasm-bindgen %s branch is:", data.name);
console.log("%s, authored by %s <%s>", data.commit.sha, data.commit.commit.author.name, data.commit.commit.author.email);
})
});