ho provato anche così:
ma sempre stessa cosacodice:async function xhttp(url, formdata){ const response = await fetch(url, { method: "POST", body: formdata }) .then(response => response.text() ) .then(function(data) { return data } ) .catch(err => console.log(err)); }