17 lines
363 B
JavaScript
17 lines
363 B
JavaScript
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);
|
|
}
|