Hello! Im trying to build an API call in the javascript node. But when I try to use the XMLHttpRequest function it says "JST-31000 XMLHttpRequest is not defined. I can't get my head around why it doesnt work.
var xhr = new XMLHttpRequest();
var url = "https://condst.maklasde.vitsdc.net/CRM/";
xhr.open("GET", url);
xhr.setRequestHeader("Authorization", "Basic NTgaassdasdsdasdasdNVRVBzeGFmeW1nUm4=");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
xhr.send();
Hope you can help out
Regards, Martin