asd
This commit is contained in:
11
test_data/fetch_promise_test.ts
Normal file
11
test_data/fetch_promise_test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
async function logPromiseResult() {
|
||||
try {
|
||||
const response = await fetch({input: "https://httpbin.org/get"});
|
||||
console.log("Fetch successful, OK:", response.ok);
|
||||
console.log("Status:", response.status);
|
||||
} catch (error) {
|
||||
console.log("Fetch failed:", error);
|
||||
}
|
||||
}
|
||||
|
||||
logPromiseResult();
|
||||
Reference in New Issue
Block a user