Sailsjs: Difference between `req.body` and `req.params.all()`

express, sails.js

Solution

`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):

- the route (e.g. the `id` in `/post/:id`).

- the request body

- the query string

Problem

What is the difference between `req.body` and `req.params.all()` when used in a sails controller?

Original source