You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
3.0 KiB

window.PostConsentAsync = (requesturi, body) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('POST', requesturi, false);
httpRequest.setRequestHeader("Content-type", "application/json");;
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
var value = JSON.parse(httpRequest.responseText);
if (value.status == 'SUCCESS') {
window.location = value.result;
}
}
};
httpRequest.send(JSON.stringify(body));
return false;
};
window.GetContextAsync = (requesturi) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', requesturi, false);
var value;
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
value = JSON.parse(httpRequest.responseText);
}
};
httpRequest.send();
return value;
};
window.GetErrorAsync = (requesturi) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', requesturi, false);
var value;
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
value = JSON.parse(httpRequest.responseText);
}
};
httpRequest.send();
return value;
};
window.PostLogInAsync = (requesturi, body) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('POST', requesturi, false);
httpRequest.setRequestHeader("Content-type", "application/json");;
var value = '';
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
value = JSON.parse(httpRequest.responseText);
if (value.status == 'SUCCESS') {
value = value.result;
}
}
};
httpRequest.send(JSON.stringify(body));
return value;
};
window.PostLogInAsync = (requesturi, body) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('POST', requesturi, false);
httpRequest.setRequestHeader("Content-type", "application/json");;
var value = '';
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
value = JSON.parse(httpRequest.responseText);
if (value.status == 'SUCCESS') {
value = value.result;
}
}
};
httpRequest.send(JSON.stringify(body));
return value;
};
window.LocationAsync = (requesturi) => {
window.location = requesturi;
};
window.GetLogOutAsync = (requesturi) => {
var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', requesturi, false);
var value;
httpRequest.onreadystatechange = function () {
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
value = JSON.parse(httpRequest.responseText);
}
};
httpRequest.send();
return value;
};