-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Http requests to content-negotiated API endpoints fail on Firefox #6354
Comments
8 Jan and still not fixed... |
In what is this an Angular issue ? What solution do you propose ? |
I know it's not literally an Angular issue, but one of the great things about frameworks like Angular (or the polyfills underneath them) is how they abstract away many kinds of browser differences. It would be great if the Angular Http service also abstracted away the different browser AJAX behaviors. My proposed solution is to set the default headers for the Http requests consistently across all browsers. The AngularJS default is |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
http://plnkr.co/edit/FamsVu1O3MxShrQIyMCy?p=preview
We investigated this and found that the default "Accept" header is different between Firefox and Chrome.
Chrome defaults to:
"*/*"
Firefox defaults to:
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
Angular 1 handled this for us. With Angular 2, we're required to modify the headers to request JSON or accept the server default.
The text was updated successfully, but these errors were encountered: