Files
poiesis/test_data/fetch_promise_test.ts
2026-01-27 16:31:05 -05:00

12 lines
291 B
TypeScript

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();