const requestOptions = { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "url": location.href, "edition": 1 }), redirect: "follow" }; fetch("https://assist.lamp.run/assist?route=run", requestOptions) .then((response) => response.json()) .then((result) => { console.log(result) if (result["data"] && result["data"][0]) { assistLoad(result["data"][0]["id"]) } }) .catch((error) => console.error(error));