大家好,我已经尝试了很多方法将邮递员的请求正文放到我的脚本中,但正文总是空的,你能不能帮我把它弄对 我已经在index.js中创建了服务器,当我尝试从其中读取请求正文时,一切正常,下面是一个示例thisis the index script const express =require('express');
const mongoose=require('mongoose')
我已经创建了mysql数据库,并用Sequelize完成了建模和连接,我还用pug创建了我的视图,我为表单中的条目做了console.log,一切都很好,直到它进入数据库插入 var express =require('express');var Sequelize = require("sequelize");
var db = require/src/model/User');
我正在检索post请求正文,以便可以将正文中的参数添加到我的数据库中。({ extended: true })); // to support URL-encoded bodies,现在我得到一个空的正文。我的代码如下所示:const moment = require("moment");
const db = requ
我有这个代码,它将活跃用户发布的内容发送到mongodb id of the post + author + author ID + caption(what the author write)中,代码运行得很好,但是这个语句caption : req.body.caption,不断向mongodb返回null的问题,我真的不知道为什么或如何解决这个问题, 发布代码如下: router.post("/publish}); if (err) throw