add http-server part 7.7

This commit is contained in:
Christopher Hase 2025-04-11 11:05:48 +02:00
parent 3c6d238ab8
commit acdeb23c92

View file

@ -3,9 +3,13 @@ function handleClick(): void {
console.log("Der Button wurde geklickt!"); console.log("Der Button wurde geklickt!");
alert("Hallo von TypeScript!"); alert("Hallo von TypeScript!");
fetch("/api/command", { method: "POST" }) fetch("http://localhost:8090/api/command", { method: "POST" })
.then(res => res.text()) .then(res => res.text())
.then(text => console.log("Server sagt:", text)); .then(text => console.log("Server sagt:", text));
/*fetch("/api/command", { method: "POST" })
.then(res => res.text())
.then(text => console.log("Server sagt:", text));*/
/*fetch("https://192-168-197-2.c-one-infra.de/api/command", { method: "POST" }) /*fetch("https://192-168-197-2.c-one-infra.de/api/command", { method: "POST" })
.then(res => res.text()) .then(res => res.text())