**I have installed body-parser on this challenge hope am right.the problem is am not completing the challenge **
solution link: https://boilerplate-express.nanasv.repl.co
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 8.1.0; itel A16 Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.93
`var express = require(‘express’);
var app = express();
var bodyParser = require(‘body-parser’);
app.post(’/name’, (req, res) => {
let name = req.body.first + ’ ’ + req.body.last;
res.json({name: name});
});
I don’t really understand your question, but I try to follow the instructions. Sorry is there any thing that am missing?
The code ones again. Please tell me where am wrong
`var express = require(‘express’);
var app = express();
var bodyParser = require(‘body-parser’);
app.post(’/name’, (req, res) => {
let name = req.body.first + ’ ’ + req.body.last;
res.json({name: ‘firstname lastname’});
});
you are missing the middleware mounted app.use(bodyParser.urlencoded({ extended: false }));
Did you not follow correctly the instructions for the previous challenge?
For you to read the req.body, it first needs to be decoded by the bodyParser method(which is a middleware)