TL;DR
如何为每个单独的文件/输入/文本设置Content-Type标题multipart/form-dataInsomnia 中)?
我正在尝试使用 Insomnia Rest Client 发布到 OneNote API( HTTP 描述)。根据文档,我需要提交一个multipart/form-data带有标题的文件/文本的请求:
Content-Type: text/html
Content-Disposition: form-data; name=presentation
另一个带有标题:
Content-Type: application/inkml+xml
Content-Disposition: form-data; name=presentation-onenote-inkml
这是我正在尝试的屏幕截图:
如您所见,API 返回错误,No Content-Type导致我相信Content-Type未设置标头。调试信息如下:
POST 数据被隐藏,这不允许我看到Content-Type.
