You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With ember-data version 3.8.0 the correct content-type is sent with a POST request, in particular application/hal+json, however, upgrading ember-data to 3.9.0 causes the content-type to be application/vnd.api+json.
We set the headers ourselves in the HalAdapter by doing
It looks like the ember-data guys have made a change so that the ajaxOptions method now sets the contentType to be application/vnd.api+json.
The workaround in my own code for this is to override ajaxOptions in each of my adapters to be:
ember-data-hal-9000 version: 0.3.3
ember-data version: 3.9.0
With ember-data version 3.8.0 the correct content-type is sent with a POST request, in particular application/hal+json, however, upgrading ember-data to 3.9.0 causes the content-type to be application/vnd.api+json.
We set the headers ourselves in the HalAdapter by doing
It looks like the ember-data guys have made a change so that the ajaxOptions method now sets the contentType to be application/vnd.api+json.
The workaround in my own code for this is to override ajaxOptions in each of my adapters to be:
/** * Overrides the AJAX options. */ ajaxOptions() { const hash = this._super(...arguments); hash.headers['content-type'] = "application/hal+json"; hash.headers['Accept'] = "application/hal+json"; return hash; },
The text was updated successfully, but these errors were encountered: