Ember Octane when calling a save on the model what is the default accept and content-type headers?

亡梦爱人 提交于 2020-05-16 02:31:06

问题


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.

Is it application/json or application/vnd.api+json?


回答1:


It depends on the adapter you are using , the default one is json-api , the latest JSON API specification says

Clients MUST send all JSON:API data in request documents with the header Content-Type: application/vnd.api+json without any media type parameters

REF



来源:https://stackoverflow.com/questions/61451731/ember-octane-when-calling-a-save-on-the-model-what-is-the-default-accept-and-con

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!