Why can not I get the content of this script

var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState === 4) { if (request.status === 200) { document.body.className = 'ok'; console.log(request.responseText); } else { document.body.className = 'error'; } } }; request.open("GET", "https://opskins.com/ajax/browse_scroll.php?page=1&appId=730&contextId=2", true); request.send(null); 

I send a request from this page https://opskins.com/?loc=shop_browse . There I have already logged in, but the js script still does not work.

  • add request.withCredentials = true; - nörbörnën
  • Failed to load resource: the server responded with a status of 404 () .. Added. The console gives an error - Udachnik
  • @norbornen More bugs). Uncaught DOMException: Failure to set the content of the property "with the XML Remedy": UNSENT or OPENED. at chrome-extension: //mipajlnafediioaiklmogkokllfcaamd/content.js: 14: 25 - Udachnik
  • so when you request https://opskins.com/ajax/browse_scroll.php?page=1&appId=730&contextId=2 really 404 status. How to confirm that this request returns a good response in some circumstances? - nörbörnën
  • @norbornen $.ajax({ type: 'GET', url: 'https://opskins.com/ajax/browse_scroll.php?page=1&appId=730&contextId=2', success: (body) => { console.log(body); } }); - Udachnik

0