【发布时间】:2020-04-27 04:27:47
【问题描述】:
在 Ember Octane 中,当在模型上调用保存时,它会调用保存到后端 (.NET CORE 3.1),默认的 accept 和 content-type 标头是什么?我曾尝试在网上查找,但似乎在文档中找不到任何内容。
是application/json 还是application/vnd.api+json?
【问题讨论】:
标签: json ember.js asp.net-core-3.1
在 Ember Octane 中,当在模型上调用保存时,它会调用保存到后端 (.NET CORE 3.1),默认的 accept 和 content-type 标头是什么?我曾尝试在网上查找,但似乎在文档中找不到任何内容。
是application/json 还是application/vnd.api+json?
【问题讨论】:
标签: json ember.js asp.net-core-3.1
这取决于你使用的适配器,默认是 json-api , 最新的 JSON API 规范说
客户端必须在请求文档中发送所有 JSON:API 数据,并带有 header Content-Type: application/vnd.api+json 没有任何媒体类型 参数
【讨论】: