Middle
Middle

Reputation: 367

XMLHttpRequest.responseURL in IE

I'm looking a way to get XMLHttpRequest.responseURL in IE.

My code (myreq.responseURL) works correctly using Chrome, Firefox, and Safari.

Is there a way to do the same (also using another function) in IE?

Any help is really appreciated.

Upvotes: 12

Views: 3064

Answers (2)

Ste Griffiths
Ste Griffiths

Reputation: 318

If you have the response, you can use response.config. So in my case, this worked:

const originalUrl = response.request.responseURL || response.config.url

Upvotes: 1

Isaac Abramowitz
Isaac Abramowitz

Reputation: 540

XMLHttpRequest.responseURL is not supported in IE as of yet.

The closest alternative I could think of is XMLHttpRequest.getResponseHeader()

Upvotes: 3

Related Questions