node-mock-server doesn't parse 'application/json' content type request data
|
app.use(bodyParser.json()); |
As a solution might be replacement of: app.use(bodyParser.json());
with: app.use(express.json());
since in the project express version 4.16+ is used (
https://medium.com/@mmajdanski/express-body-parser-and-why-may-not-need-it-335803cd048c)
node-mock-server doesn't parse 'application/json' content type request data
node-mock-server/lib/controller/AppController.js
Line 97 in a97d923
As a solution might be replacement of: app.use(bodyParser.json());
with: app.use(express.json());
since in the project express version 4.16+ is used (https://medium.com/@mmajdanski/express-body-parser-and-why-may-not-need-it-335803cd048c)