1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 16:11:13 -05:00
denoland-deno/testdata/fetch.ts

13 lines
301 B
TypeScript
Raw Normal View History

2018-05-27 03:46:18 -04:00
const request = async () => {
const response = await fetch('http://localhost:4545/package.json');
const json = await response.json();
console.log("expect deno:", json.name);
if (json.name !== "deno") {
throw Error("bad value" + json.name);
}
}
request();
console.log("fetch started");