smollweide / node-mock-server

File based Node REST API mock server
MIT License
255 stars 65 forks source link

node-mock-server doesn't parse 'application/json' content type #136

Closed kabaybodia closed 4 years ago

kabaybodia commented 4 years ago

node-mock-server doesn't parse 'application/json' content type request data https://github.com/smollweide/node-mock-server/blob/a97d9231045a1e856df803cafb2e3b3cb6834a28/lib/controller/AppController.js#L97 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)

smollweide commented 4 years ago

Hi @kabaybodia; done with release 0.25.2