rd
rd
Explore posts from servers
CDCloudflare Developers
Created by rd on 7/20/2023 in #workers-help
request.json() timing out
I just started with cloudflare workers, initialised a new worker using npm create cloudflare@latest and am finding the execution times out if I use request.json(). Is there anything obvious I'm missing? Even if my code is just as below, I don't get a response, but removing the logged line, I do:
export default {
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
console.log(await req.json());
return new Response('Hello World!');
},
};
export default {
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
console.log(await req.json());
return new Response('Hello World!');
},
};
2 replies