Cant get request payload in express js node

后端 未结 5 912
终归单人心
终归单人心 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:38

    Your content-type header is text/plain. Please try replacing

    app.use(bodyParser.json());
    

    with

    app.use(bodyParser.text());
    

提交回复
热议问题