I use REST client apps in chrome to create a request using method POST: It's here:
http://localhost:1337/[email protected]&password=123123123&password_c=123123123
The results (req.body.email or req.body.password) return undefined when I log them in console
What's problem? Here is my order in middleware for http request
order: [
'startRequestTimer',
'cookieParser',
'session',
'myRequestLogger',
'passportInit',
'passportSession',
'bodyParser',
'handleBodyParserError',
'compress',
'methodOverride',
'poweredBy',
'$custom',
'router',
'www',
'favicon',
'404',
'500'
],
Thanks all!
req.body doesn't have data, your email and password is in your URL. You can have it by using req.params.email.
If this doesn't work, can you post your Controller that handle the route 'POST /signup'?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With