So the docs for sendRequestAs state "The response as would be returned to the client"
My plan was to use SendRequestAs as sort of an admin function (possibly called through callback) - and I don't see how the response could be sent to the client - as there really IS no client in the case of cloud code executed through a server callback (for example).
Thoughts?
Best Answer
T
Tech Support
said
over 6 years ago
Hi Jeff,
When using SendRequestAs, the response is returned to cloud code as the return value of the method call. You could assign this to a variable and treat it as any other JavaScript object in code.
The documentation states "The response as would be returned to the client", not "The response returned to the client".
When using SendRequestAs, the response is returned to cloud code as the return value of the method call. You could assign this to a variable and treat it as any other JavaScript object in code.
The documentation states "The response as would be returned to the client", not "The response returned to the client".
Jeff Amiel
So the docs for sendRequestAs state "The response as would be returned to the client"
My plan was to use SendRequestAs as sort of an admin function (possibly called through callback) - and I don't see how the response could be sent to the client - as there really IS no client in the case of cloud code executed through a server callback (for example).
Thoughts?
Hi Jeff,
When using SendRequestAs, the response is returned to cloud code as the return value of the method call. You could assign this to a variable and treat it as any other JavaScript object in code.
The documentation states "The response as would be returned to the client", not "The response returned to the client".
Regards,
Jonathan.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTech Support
Hi Jeff,
When using SendRequestAs, the response is returned to cloud code as the return value of the method call. You could assign this to a variable and treat it as any other JavaScript object in code.
The documentation states "The response as would be returned to the client", not "The response returned to the client".
Regards,
Jonathan.
Jeff Amiel
okdokey...thanks!!
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics