diff --git a/Client/scripts.js b/Client/scripts.js index 7d68143..46da7c2 100644 --- a/Client/scripts.js +++ b/Client/scripts.js @@ -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: {