From a831d1e2391e67f6d6ad3284ab9858d9b8d610c1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 27 May 2018 03:46:18 -0400 Subject: Implement fetch --- testdata/fetch.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 testdata/fetch.ts (limited to 'testdata/fetch.ts') diff --git a/testdata/fetch.ts b/testdata/fetch.ts new file mode 100644 index 000000000..24d413903 --- /dev/null +++ b/testdata/fetch.ts @@ -0,0 +1,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"); -- cgit v1.2.3