var xhr = new XMLHttpRequest();
xhr.open(‘GET’, “https://devicecloud.digi.com/ws/AlarmStatus”, true);
xhr.withCredentials = true;
xhr.setRequestHeader(“Authorization”, "Basic "+encodeduserpass);
XMLHttpRequest cannot load https://devicecloud.digi.com/ws/AlarmStatus. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://xxxxxxxx’ is therefore not allowed access. The response had HTTP status code 401.