Ember Octane在模型上调用保存时,默认的accept和content-type标头是什么? [英] Ember Octane when calling a save on the model what is the default accept and content-type headers?

查看:87
本文介绍了Ember Octane在模型上调用保存时,默认的accept和content-type标头是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ember Octane中,当在模型上调用保存(该保存调用到后端(.NET CORE 3.1))时,默认的acceptcontent-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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆