Hi all, requesting for parameters that can be captured from appwrite server when working with APPWRITE_FUNCTION_EVENT_DATA on client side. Possibly can also assist with document that show structure and content of APPWRITE_FUNCTION_EVENT_DATA.
APPWRITE_FUNCTION_EVENT_DATA or req.payload contains the data being sent to the function.
The value is string.
So when you send it you should stringify it, and parse it
Client
await functions.createExeuctions('',JSON.stringify({}));
Function
try {
const data = JSON.parse(req.payload);
// This is just like the above row
const data = JSON.parse(req.variables['APPWRITE_FUNCTION_EVENT_DATA']);
} catch (e) {
// Data is not json parsable.
}
thank you
thank you
[SOLVED] How to use APPWRITE_FUNCTION_EVENT_DATA?
Recommended threads
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...