Thu Feb 14 2019
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
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)
  }
}