- this.api.status = await fetch(url)
- .then((response) => "enabled")
- .catch((e) => "disabled");
+ fetch(url, { method: "HEAD", cache: "no-cache" })
+ .then((response) => {
+ if (!response.ok) {
+ throw Error(response.statusText);
+ }
+ this.status = "online";
+ })
+ .catch(() => {
+ this.status = "offline";
+ });