简体   繁体   中英

Request.body is undefined in second post request

I searched for similar symptoms, but couldn't find my case.

I have body-parser installed and

 app.use(bodyParser.json()) app.use(bodyParser.urlencoded({extended: true}))
this written.

But if I have multiple POST requests, only first req.body is recognized and secondary req.body only returns {}.

PLEASE HELP

Turns out that I only declared id for HTML tag.

I added name for the tag and it worked perfectly!

I would be appreciated if someone explained difference between id and name for HTML tag...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM