
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
- User Queries not working
When I try to use queries on users, it gives error saying invalid query method. Now, I dont know whether it is possible or not to query users or it’s just some...
- appwrite cli alpine os
the appwrite cli does not work on alpine os if you install it using the recommended bash script. Maybe there is the possibility to compile it for alpine using t...
- Email OTP Mail Getting Delayed by 10 min...
I just noticed I am reciving delayed otp emails on frankfurt server we are on free plan now but we are planning to change to get on to paid plan can anyone plea...
