【发布时间】:2021-11-17 00:17:45
【问题描述】:
我想通过 Postman 发布以下 JSON 对象:
{
"title": "test_title",
"date": "2021-12-31",
"attachments": [
{
"name": "test_attachment"
}
]
}
当使用 Postman 的原始输入表单作为请求正文时,这非常有效:我收到“201 Created”响应。
但是,当使用表单数据发布数据时,我收到错误"Invalid data. Expected a dictionary, but got str."(另见下面的屏幕截图)我在这里做错了什么?我尝试了所有其他版本来输入附件键:值对,但到目前为止没有任何效果
【问题讨论】: