node.js - Parsing postdata value in nodejs -
i have post data in format below
authinfo={"user":"1","password":"a"}
how key ie authinfo. stuck here! req.query
did not work out. appreciated.
data transmitted via post found in req.body
.
for example:
req.body.authinfo
also: need data parser enabled, otherwise post data not decoded. assume use express, need app.use(express.bodyparser())
.
Comments
Post a Comment