
Hi, before the recent update of appwrite cloud to 1.4.3, I was calling a function remotely with my data payload as a json string using curl.
Now apparently I'm not getting data anymore inside my function, did something change?

Payload now doesn't exist

But body

How to pass it using curl?

To pass data in the body using curl
, you can use the -d
or --data
option followed by the data you want to send. For JSON data, you would also typically set the Content-Type
header to application/json
. Here's an example:
curl -X POST "http://your-appwrite-function-endpoint" \
-H "Content-Type: application/json" \
-d '{"key1": "value1", "key2": "value2"}'
Replace http://your-appwrite-function-endpoint
with your actual function endpoint and modify the JSON data as needed. This will send the data in the body of the request.

@D5 is there any other way of passing it through body?

I see. So maybe my issue is that req.payload has changed, when retrieving data?

I'm logging req, but body is always empty "", after the update

Can you show your log and your code once

I solved changing the url to the new domain one and updated the function too, no idea why though

So now I'm using req.body


Yeah I solved changing that but it wasn't enough, because for some reason I didn't receive the body anyway. After upgrading both the function and the caller (to use the new domain thing and to pass the body json directly) it worked though, thanks to you all

it should have worked if you changed the param in the body client...or maybe you needed to specify the method and content type header as well..

Hmm no and this function I had was working because I used it until yesterday. No idea why though, maybe you can't pass the body without using the new domain thing?

no, using the new domain is not a requirement

I see. No idea then

[SOLVED] Payload not passed anymore

Yes, you can pass data through body

Please, create another post if you still need assistance

Yup read the doc make sense
Recommended threads
- Unable to create push providers - FCM or...
Currently unable to create a push provider for FCM or APNS.... https://github.com/appwrite/console/issues/2045 When uploading a file... FCM = Valid file retu...
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
