XMLHttpRequest

var data = new FormData();

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://blizzcmsv2.fixcore.fx/api/ApiAccount/user/5"); //this is my website url & method
xhr.setRequestHeader("x-api-key", "MYCODE@123"); //this is my Api key
xhr.setRequestHeader("authorization", "Basic MYCREDENTIAL"); //this is my credential

xhr.send(data);