From 86a37a89c6fa11924d5d8a4f2bea4948a0e81d2c Mon Sep 17 00:00:00 2001 From: Kristy Fournier <124598538+kristy-fournier@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:35:47 -0500 Subject: [PATCH] secure getFromServer is possible --- Client/scripts.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: {