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!');
},
};
1 Reply
rd
rd11mo ago
Ah, it seems like having the content-length header present was causing issues