I'm running through the parse.com tutorial,
https://www.parse.com/docs/cloud_code_guide
and it mentions that when i'm doing some cloud code, I should get the json values using request.params.someParam
All well and good, except the tutorial then immediately starts making calls to request.object.get("someParam")
What is the difference between request.object.get() and request.params.theParam? Is one better than the other? Is this a standard javascript thing that i should know (i don't know js a whole bunch)
They are two different concepts. One is used in Cloud Functions, the other in object saving triggers.
request.params
is used in Cloud Functions to access GET/POST parameters.
request.object
is used in beforeSave/afterSave triggers to access the object being saved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With