up link and change to post
This commit is contained in:
@ -93,7 +93,7 @@
|
||||
const link = document.getElementById("link").value
|
||||
const xhr2 = new XMLHttpRequest();
|
||||
// TODO: скорректировать ссылку, она должна быть относительной
|
||||
xhr2.open('GET', 'http://'+document.location.host+'/check/?link=' + link);
|
||||
xhr2.open('POST', 'http://'+document.location.host+'/check');
|
||||
xhr2.responseType = 'json';
|
||||
xhr2.onload = function() {
|
||||
// TODO: добавить обработку исключений и всех возможных кодов в ответе
|
||||
@ -112,7 +112,7 @@
|
||||
document.forms.download.querySelector('.submit-spinner').classList.add('submit-spinner_hide');
|
||||
};
|
||||
};
|
||||
xhr2.send()
|
||||
xhr2.send(link)
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user