WebUI: migrate to fetch API

This is the final part of it.

PR #22072.
This commit is contained in:
Chocobo1
2024-12-29 15:44:28 +08:00
committed by GitHub
parent e740a42366
commit 9c0475ebfa
15 changed files with 626 additions and 551 deletions

View File

@@ -354,7 +354,12 @@ window.qBittorrent.PropFiles ??= (() => {
current_hash = new_hash;
loadedNewTorrent = true;
}
fetch(new URI("api/v2/torrents/files").setData("hash", current_hash), {
const url = new URL("api/v2/torrents/files", window.location);
url.search = new URLSearchParams({
hash: current_hash
});
fetch(url, {
method: "GET",
cache: "no-store"
})