diff --git a/index.html b/index.html index 5143322..573aef0 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,9 @@ PizzaExpress Web + - + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..6977e24 --- /dev/null +++ b/script.js @@ -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); +}