-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Ember-Data 3.9.1 adapter "headers" seems to be not getting sent. #6058
Comments
Hi Nikhil, This does appear to be a regression. This line here needs to be changed to the following options.contentType = options.contentType || 'application/vnd.api+json'; If you could submit a PR with this fix and a test that would be greatly appreciated :) |
Hi Chris, Thanks for pointing me to the code line causing this issue. I have made the change, and now trying to push my local branch to the repository, but I am getting following error:
Seems like I do not have permissions to submit to this repo. thanks, |
@nikhilsane generally you would fork the repo, push to your own fork, and PR from your fork to this repository. Happy to help you learn how to do so if you are not familiar with that process :) |
@runspired : Thanks for the information. I have created a pull request from a fork. Please let me know if there is something missing. Thanks, |
data/packages/adapter/addon/json-api.js Line 159 in 2db279a
Accept like this
Consider: headers: computed(function() {
return {
'Content-Type': 'application/vnd.api+json; version=1',
'Accept': 'application/vnd.api+json; version=1'
}
}), |
@rwjblue that was already noted in the PR discussion, but thanks :) |
Hi ember-data team, First of all, thank you for your work! I'm writing because I found an issue on the IssueThe issue that I'm seeing is the following: It seems like the I've confirmed that this is happening on ember-data version greater than 3.9.0. Versions
|
Ember-Data 3.9.1 JSONAPIAdapter does not seem to send headers.
Hi Ember-Data team,
I have following Adapter in my application:
When using v3.9.1, the "findAll" query sends the following header in the request:
When using v3.5.1, the "findAll" query that is sent to the back-end API looks like the following:
So, as can be seen from the above outputs, the same code does not seem to work in v 3.9.1. Is this expected behavior? Am I missing something here?
Versions
Following are the versions of the packages: ember-source, ember-cli, ember-data
Thanks,
Nikhil.
The text was updated successfully, but these errors were encountered: