secure getFromServer is possible

This commit is contained in:
Kristy Fournier 2026-02-01 23:35:47 -05:00
parent 95efd937f6
commit 86a37a89c6

View file

@ -50,9 +50,11 @@ async function getFromServer(bodyInfo, source="", secure=false, password=adminPa
}
let href = "";
if(secure) {
href = "https://"+ip+"/"
href = "https://"+ip+"/" + source;
} else {
href = "http://"+ip+"/" + source;
}
const response = await fetch("http://"+ip+"/"+source, {
const response = await fetch(href, {
method: "POST",
body: JSON.stringify(bodyInfo),
headers: {