summaryrefslogtreecommitdiff
path: root/testdata/fetch.ts
blob: 24d4139039a5e78b5f1b94d823c32b2c6c31b4b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

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");