Hi I know that to return response from Appwrite cloud function I do the following
return context.res.send(body);
but how can I add value to the returned header. For example
final tokens = 10;
// I want to add the variable "tokens" to the hader of the returned response
return context.res.send(body);
In the above example I want to **append ** the tokens to the **header **not the body
You can do
…send(body, 200, {
"tokens": "…",
})
Great, thanks
Can this be marked as solved now?
Yes
[SOLVED] How to add value to headers in Cloud Functions
Recommended threads
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...
- One to many 2 way, console UI not correc...
Hey, seems I'm facing the exactly same issue with this one: https://github.com/appwrite/appwrite/issues/6016 Since this Github issue stay open for so long, let ...
- "Domain verification failed"
"Domain verification failed" I was install Appwrite in my VDS server. I using Coolify for install Appwrite. After install complete, i want add my domain, and i ...