Parse.com difference between request.object and request.params

I am running the parse.com tutorial,

https://www.parse.com/docs/cloud_code_guide

and he mentions that when I do some cloud code, I have to get json values ​​using request.params.someParam

Everything is good and good, except for the textbook, it immediately starts calling request.object.get("someParam")

What is the difference between request.object.get () and request.params.theParam? Better than the other? Is this the standard javascript I should know (I don't know js a whole bunch)

+6
source share
1 answer

These are two different concepts. One is used in cloud functions, the other in triggers for saving objects.

  • request.params used in cloud functions to access GET / POST parameters.

  • request.object used in beforeSave / afterSave triggers to access a stored object.

+11
source

All Articles