Open
Description
code:
async function app(event) {
console.log(event)
try {
const response = fetch("http://jsonplaceholder.typicode.com/users", {
method: "GET",
})
console.info("success", response)
return response
} catch (e) {
console.warn("panic", e)
return new Response(JSON.stringify({
error: e.stack
}))
}
}
addEventListener('fetch', (event) => {
event.respondWith(app(event).then(r => {
console.info("request success", r)
return r
}).catch(e => {
console.warn("request error", e)
return new Response(e.message || "Server Error", {
status: e.status || 500,
});
}));
});
curl 'http://localhost:3006/current'
NetworkError when attempting to fetch resource
@godronus Hello, Could you help me look into this issue? Thanks a lot
Metadata
Metadata
Assignees
Labels
No labels