gpt4 book ai didi

javascript - 如何将数据添加到 postman

转载 作者:搜寻专家 更新时间:2023-11-01 04:29:36 25 4
gpt4 key购买 nike

如果我想在下面的架构中添加一些数据:

'use strict';

var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var notificationsSchema = new mongoose.Schema({
notifyMessage : {
title : { type: String },
des : { type: String }
},
notifier : { type: String },
recipient : [{
id : { type: String },
status : {type:String,trim:true,enum:['read','unread']}
}]
});

module.exports = mongoose.model('notification_tracker', notificationsSchema);

我试过这样: enter image description here enter image description here

但是结果是这样的..

最佳答案

选择raw 单选按钮并确保将其设置为JSON(application/json) 然后像这样粘贴或添加您的JSON 对象

enter image description here

{
notifyMessage: {
title: "",
des: ""
},
notifier: "",
recipient: [{
id: "",
status:""
}, {
id: "",
status:""
}]
}

使用这种格式

关于javascript - 如何将数据添加到 postman ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41847106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com