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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...