Test function fixed (now showing raw JSON body result in alert)

This commit is contained in:
Andrea
2025-11-06 08:33:08 +01:00
parent 80b4a47a99
commit d36a289e7e

View File

@@ -8,9 +8,7 @@ function orkodyo(){
}; };
fetch(apiUrl + "/api/pizze", requestOptions) fetch(apiUrl + "/api/pizze", requestOptions)
.then((response) => reply = response.text()) .then((response) => response.text())
.then((result) => console.log(result)) .then((result) => alert(result))
.catch((error) => console.error(error)); .catch((error) => console.error(error));
alert(reply);
} }