- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
var client = new XMLHttpRequest();
client.open("GET", "https://www.rosettastone.com/gils", true);
client.send();
client.onreadystatechange = function() {
if(this.readyState == this.HEADERS_RECEIVED) {
console.log('got headerss')
var contentType = client.getResponseHeader("X-GI");
console.log('CT: ', contentType)
}
}
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(null);