Ember Octane在模型上调用保存时,默认的accept和content-type标头是什么? [英] Ember Octane when calling a save on the model what is the default accept and content-type headers?
问题描述
在Ember Octane中,当在模型上调用保存(该保存调用到后端(.NET CORE 3.1))时,默认的accept
和content-type
标头是什么?我尝试过在线查找,但似乎无法在文档中找到任何内容.
In Ember Octane, when calling a save on the model, which calls a save to the back-end (.NET CORE 3.1), what is the default accept
and content-type
headers? I have tried looking online, but I cannot seem to find anything in the documentation.
是application/json
还是application/vnd.api+json
?
推荐答案
这取决于您使用的适配器,默认适配器是json-api, 最新的JSON API规范说
It depends on the adapter you are using , the default one is json-api , the latest JSON API specification says
客户必须在请求文档中使用以下格式发送所有JSON:API数据: 标头Content-Type:没有任何媒体类型的application/vnd.api + json 参数
Clients MUST send all JSON:API data in request documents with the header Content-Type: application/vnd.api+json without any media type parameters
这篇关于Ember Octane在模型上调用保存时,默认的accept和content-type标头是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!