Quantcast
Channel: Can't figure out correct way to use body-parser - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by mscdex for Can't figure out correct way to use body-parser

You can use util.inspect() to get a string representation of the value, or use console.dir(req.body) which outputs util.inspect(req.body) to stdout.

View Article



Answer by javierfdezg for Can't figure out correct way to use body-parser

You are doing nothing wrong. The [Object object] you see is due to the console.log. Try this: console.log(req.body.user). My guess is that you'll see the correct output. Have a look to this question...

View Article

Can't figure out correct way to use body-parser

I am writing the backend of a simple app using node and express. This is how I have structured my code:app.jsvar express = require("express");var bodyParser = require("body-parser");var app =...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images