What is the difference between req.body
and req.params.all()
when used in a sails controller?
req.body
is whatever was parsed out of the request body, for example the payload in a POST
request. req.params.all()
gives you the collection of parameters culled from (in order of precedence):
id
in /post/:id
).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