h
Size: a a a
h
h
AL
AL
h
h
h
tn
h
h
G
Python 3.9.0b3
AD
AD
fetch
он точно асинкfunction send_patch(url) {
return fetch(url,{
method: "PATCH",
credentials: "include",
cache: "no-cache",
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': getCookie('csrftoken'),
},
})
.then(response => response.json());
}
send_patch(url)
.then(response => {
if (response.message === "success") {
button.parentElement.innerHTML = response.technic;
} else {
console.error("The technician is not attached.")
}
})
.catch(error => console.error(error));
AD
AD
AD
AD
N