OpenNext worker apis not working properly in deployed environment
Hello, I have an OpenNext worker, with an api route /api/subscribe. Here is the endpoint:
The problem is on local environment everything is fine and the logs are :
but the deployed version receives empty request:
you can see the structure in the picture.
I had another api with the same problem, am I doing something wrong?

3 Replies
ok didn't know that thanks. I was trying to log it because I was trying to extract the body from the request, which is what I need to process. The problem is that when I tried to do so with
an error occurs
which to me it seems like the body is empty. Is this approach of extracting it wrong?
this api is supposed to be triggered by a button on click from my page component, this is the call
I'm not very proficient with js/ts but this is what I found online suggested to do it. I was also even more confused because on local environment it was working as expected
I also just checked the network tab on the deployed version and the request call looks ok

ok I fixed it. The wrangler version was outdated and after the update everything worked