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

XDomainRequest support #140

Merged
merged 14 commits into from Nov 21, 2015

Conversation

@vineethawal
Copy link
Contributor

commented Oct 29, 2015

No description provided.

Vineet Hawal added some commits Oct 29, 2015

@vineethawal

This comment has been minimized.

Copy link
Contributor Author

commented Oct 29, 2015

Closes #131

Vineet Hawal
@terrierscript

This comment has been minimized.

Copy link

commented Oct 29, 2015

+1

Vineet Hawal
@vineethawal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 4, 2015

@mzabriskie if the PR looks good can you have it merged?

@ldabiralai

This comment has been minimized.

Copy link

commented Nov 10, 2015

Good job! Any news on when this'll be merged?

Looking to use it in a project without having to reference the commit hash.

@vineethawal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 18, 2015

@mzabriskie can we have this merged? we are waiting to use this feature in our project.

@mzabriskie

This comment has been minimized.

Copy link
Member

commented Nov 19, 2015

Sorry, I thought that I had replied to this already.

A couple changes need to be made, but overall I like the solution.

  • Don't commit the dist/ files
  • Resolve merge conflicts (probably just rebase on master)
  • Don't make XDomain a config option. This should be transparent to the user. Let's have axios handle the logic internally.
// This would go at the top of lib/adapters/xhr.js
var isURLSameOrigin = require('./../helpers/isURLSameOrigin');

// Slight modification to your code
var adapter = (XMLHttpRequest || ActiveXObject);
var loadEvent = 'onreadystatechange';
var xDomain = false;

// For IE 8/9 CORS support
if (!isURLSameOrigin(config.url) && window.XDomainRequest) {
  adapter = window.XDomainRequest;
  loadEvent = 'onload';
  xDomain = true;
}

Vineet Hawal added some commits Nov 20, 2015

Vineet Hawal
Vineet Hawal
Vineet Hawal
Vineet Hawal
@mzabriskie

This comment has been minimized.

Copy link
Member

commented Nov 21, 2015

There was a failing test on master when you merged. I have fixed the test. Please try merging master into your branch again.

Vineet Hawal added some commits Nov 21, 2015

Vineet Hawal
Vineet Hawal
Vineet Hawal
Vineet Hawal
@vineethawal

This comment has been minimized.

Copy link
Contributor Author

commented Nov 21, 2015

Done!

mzabriskie added a commit that referenced this pull request Nov 21, 2015

@mzabriskie mzabriskie merged commit 4bbde9a into axios:master Nov 21, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mzabriskie mzabriskie referenced this pull request Dec 21, 2015

Closed

IE10 cors broken #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.