up
This commit is contained in:
@ -92,10 +92,11 @@
|
||||
document.forms.download.querySelector('.submit-spinner').classList.remove('submit-spinner_hide');
|
||||
const link = document.getElementById("link").value
|
||||
const xhr2 = new XMLHttpRequest();
|
||||
// TODO: скорректировать ссылку, она должна быть относительной
|
||||
xhr2.open('GET', 'http://0.0.0.0:8000/check/?link=' + link);
|
||||
xhr2.responseType = 'json';
|
||||
xhr2.onload = function() {
|
||||
|
||||
// TODO: добавить обработку исключений и всех возможных кодов в ответе
|
||||
if (xhr2.status !== 200) {
|
||||
if ('response' in xhr2 && xhr2.response !== null) {
|
||||
console.log(xhr2.response)
|
||||
|
Reference in New Issue
Block a user