Skip to content

feat: Use Fetch instead of XHR when available #1157

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

Merged
merged 2 commits into from
Nov 30, 2017
Merged

feat: Use Fetch instead of XHR when available #1157

merged 2 commits into from
Nov 30, 2017

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Nov 30, 2017

Took best of both worlds from:

and added tests coverage.

@kamilogorek
Copy link
Contributor Author

kamilogorek commented Nov 30, 2017

Tests are broken in IE10/11 and mobile chrome. I'll fix them before merging.

var url = opts.url + '?' + urlencode(opts.auth);

if (supportsFetch()) {
return _window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kamilogorek here is an issue - now, if you don't pass { credentials:"include" } (include or same-origin) fetch won't pass cookies. Not passing cookies breaks authorization for hosted servers that requires it :(

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this.

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

Successfully merging this pull request may close these issues.

5 participants