Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application/vnd.api+json forced on JSONAPI Adapter #18112

Closed
Benjy1979 opened this issue Jun 18, 2019 · 1 comment
Closed

application/vnd.api+json forced on JSONAPI Adapter #18112

Benjy1979 opened this issue Jun 18, 2019 · 1 comment

Comments

@Benjy1979
Copy link

I've updated to 3.10 and it seems now my content-type set in the model adapter is being ignored.
No matter what I set it to the request uses:
application/vnd.api+json

If I throw other headers in there, like access_token, it works. So the headers() property is being noted, it's just the content-type is being ignored or overwritten.

headers: computed('webusers.access_token', function() { return { 'Content-Type': 'application/json', 'x-access-token': this.get('webusers.access_token') }; }),

The x-access-token will be in the request but he content-type still goes through as application/vnd.api+json.

Copy link
Member

rwjblue commented Jun 18, 2019

This is Ember's own issue tracker, but this seems like an issue (that has already been fixed) in ember-data.

I believe that you are hitting emberjs/data#6058 (affected both Accept and Content-Type) which was fixed in emberjs/data#6062 and is included in ember-data@3.9.2 and higher.

Can you double check your ember-data version (making sure its at least 3.9.2), and if it's 3.9.2 or higher file an issue over in ember-data (cross linking to this one)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants