Back

re.qbody throwing undefined

  • 0
  • General
dammy
25 May, 2024, 12:54

I created a new bunjs cloud function using the appwrite cloud, and I tried to access the request made to the cloud function using: log(req.body) but I'm getting undefined as the request, how do I resolve this?

TL;DR
Developers experiencing issue accessing the request body in a bunjs cloud function, receiving 'undefined' when using ```req.body``. Solution: Use ```JSON.parse(req.body)``` to properly access the request body data.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more