Dlaczego polecenie req.params zwraca pustą tablicę?

Używam Node.js i chcę zobaczyć wszystkie parametry, które zostały opublikowane w moim skrypcie. Aby dostać się do mojej funkcji, w moimroutes/index.js Robię:

<code>app.post('/v1/order', order.create);
</code>

W mojej funkcji mam:

<code>exports.create = function(req, res, next) {
 console.log( req.params );
</code>

Ale zwraca pustą tablicę. Ale kiedy robię:

<code>exports.create = function(req, res, next) {
 console.log( req.param('account_id') );
</code>

Dostaję dane. Więc jestem trochę zdezorientowany, co się tutaj dzieje.

questionAnswers(2)

yourAnswerToTheQuestion