- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
console.log('xhr status: ', xhr.status)
console.log('xhr readyState: ', xhr.readyState)
console.log('xhr response: ', xhr.response)
console.log('xhr responseURL: ', xhr.responseURL)
console.log('xhr responseType: ', xhr.responseType)
console.log('xhr statusText: ', xhr.statusText)
console.log('xhr: ',xhr.responseText)
console.log(xhr)
}
}
xhr.open('GET', 'https://www.rosettastone.com/gils', true);
xhr.setRequestHeader("Accept", "*/*");
xhr.send();