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

AJAX request from fastboot do not have correct headers #90

Closed
danmcclain opened this issue Jan 19, 2016 · 6 comments
Closed

AJAX request from fastboot do not have correct headers #90

danmcclain opened this issue Jan 19, 2016 · 6 comments

Comments

@danmcclain
Copy link
Member

Somewhat related to: #89

Our API follows the JSONAPI spec, and requires the application/vnd.json+api content-type/accepts header. Even though it is specified via JSONAPIAdapter, the "ajax" requests coming from fastboot lack that header

@tomdale
Copy link
Contributor

tomdale commented Jan 20, 2016

@danmcclain This was a najax bug, can you try with the updated release which bumps the version?

@danmcclain
Copy link
Member Author

@tomdale Didn't work with fastboot 0.2.0 with najax 0.3.2, since JSONAPIAdapter uses jqXHR.beforeSend. I have a pull request on najax: najaxjs/najax#25

@danmcclain
Copy link
Member Author

@speed1speed1
Copy link

I also got the "adapter.ajaxError" error.
Used RESTAdapter at same line in https://github.com/tildeio/ember-cli-fastboot/blob/master/app/initializers/server/ajax.js#L14
But not broken in response, it broken at call.
This problem has been resolved yet?

@danmcclain
Copy link
Member Author

@speed1speed1 Najax needs a new release first, the PR has been accepted there

@tomdale
Copy link
Contributor

tomdale commented Jan 27, 2016

Gonna close this because the imminent PR fixes it.

@tomdale tomdale closed this as completed Jan 27, 2016
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

3 participants