First server connection test prototype

This commit is contained in:
2025-11-05 08:47:54 +01:00
parent 12d95f9a4f
commit 80d557715d
2 changed files with 18 additions and 1 deletions

16
script.js Normal file
View File

@@ -0,0 +1,16 @@
const apiUrl = "https://localhost:7243";
function orkodyo(){
let reply;
const requestOptions = {
method: "GET",
redirect: "follow"
};
fetch(apiUrl + "/api/pizze", requestOptions)
.then((response) => reply = response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
alert(reply);
}