Ciao a tutti
Ho questo script:
mi da come risultato [object Promise]codice:async function xhttp(url, formdata){ const response = await fetch(url, { method: "POST", body: formdata }) } function esxample(){ let formdata = new FormData; let url = "lib/contacts.php"; let response = xhttp(url, formdata) .then(response => response.text()) .catch(err => consolo.log(err)); alert(response);
come mai?