diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 03:46:18 -0400 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 03:46:51 -0400 |
| commit | a831d1e2391e67f6d6ad3284ab9858d9b8d610c1 (patch) | |
| tree | 4c8c5cf44f050f1c5e8875bf24958c92139ea476 /testdata/fetch.ts | |
| parent | ef00cf3e38b76395abe42d406c2bb06380754091 (diff) | |
Implement fetch
Diffstat (limited to 'testdata/fetch.ts')
| -rw-r--r-- | testdata/fetch.ts | 12 |
1 files changed, 12 insertions, 0 deletions
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"); |
