Answer the question
In order to leave comments, you need to log in
How to enable fetch support in internet explorer?
Need fetch support in IE... Googled, put polyfills and nothing helped. I get this error all the time . The following response comes in response . That is, in response.body - undefined. How to be? Everything works fine in Chrome and Firefox
Answer the question
In order to leave comments, you need to log in
function myFetch(params){
return new Promise(function(resolve, reject){
const xhr = new XMLHttpRequest();
xhr.open(params.method, params.url, true);
xhr.send();
xhr.addEventListener('readystatechange', function(e){
if( xhr.readyState != 4 ) return;
if( xhr.status == 200 ){
resolve( xhr.responseText );
} else{ reject( xhr.statusText ); }
});
}
myFetch(//parameters...).then(//...... код который у Вас в then).
The issue is solved by polymorph
https://github.com/github/fetch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question