【问题标题】:Ember Octane when calling a save on the model what is the default accept and content-type headers?在模型上调用保存时 Ember Octane 的默认接受和内容类型标头是什么?
【发布时间】:2020-04-27 04:27:47
【问题描述】:

在 Ember Octane 中,当在模型上调用保存时,它会调用保存到后端 (.NET CORE 3.1),默认的 acceptcontent-type 标头是什么?我曾尝试在网上查找,但似乎在文档中找不到任何内容。

application/json 还是application/vnd.api+json

【问题讨论】:

    标签: json ember.js asp.net-core-3.1


    【解决方案1】:

    这取决于你使用的适配器,默认是 json-api , 最新的 JSON API 规范说

    客户端必须在请求文档中发送所有 JSON:API 数据,并带有 header Content-Type: application/vnd.api+json 没有任何媒体类型 参数

    REF

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-20
      • 1970-01-01
      • 2016-10-09
      • 2018-12-03
      • 1970-01-01
      • 2013-04-18
      • 2013-12-08
      • 2011-04-28
      相关资源
      最近更新 更多