mirror of
https://github.com/denoland/deno.git
synced 2025-01-10 16:11:13 -05:00
13 lines
301 B
TypeScript
13 lines
301 B
TypeScript
|
|
||
|
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");
|