Cant get request payload in express js node

后端 未结 5 919
终归单人心
终归单人心 2021-01-17 23:06

This is my Node Express Code,

(function () {
    \'use strict\';
    var fs = require(\'fs\');
    var cors = require(\'cors\');
    var bodyParser = requir         


        
5条回答
  •  情话喂你
    2021-01-17 23:15

    Hi @Pradhaban Nandhakumar, I think you have to pass data as row data. Try below code snippets.

    You should always pass raw data .

    app.post('/users', (req, res) => { res.send(req.body); });

提交回复
热议问题