Back

Client sent data but the function got empty body

  • 0
  • Functions
  • REST API
shprot
22 Jan, 2025, 01:25

Hi everyone. I have function which requires jwt in json format. The function works great with android sdk but I need to call it with RestApi from other platform. The problem is even if I add response body, I'm not able to get it into my function. According to provided logs, client sent body as required, with "Content type: application/json" header and project Id. Where is my mistake? Any ideas? As you can see, the call returns execution object with code 201. It means endpoint is correct and there are no permission errors.

TL;DR
Function not receiving data from RestAPI call made from a platform other than Android SDK, even though body is included properly. Ensure that the Content-Type header is set to application/json and double-check the project ID being passed. Endpoint and permissions seem to be fine based on the 201 response code.
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