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