From 72941b10bba9d0c5a343a36fc5529e4c594e1a8a Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 15 Aug 2022 14:53:59 +0800 Subject: [PATCH] Use proper request method --- src/webui/www/private/scripts/mocha-init.js | 1 + src/webui/www/private/scripts/speedslider.js | 4 ++-- src/webui/www/private/views/rss.html | 2 +- src/webui/www/private/views/rssDownloader.html | 4 ++-- src/webui/www/private/views/search.html | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 4f8a0e3ba..6e0c9a85f 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -1071,6 +1071,7 @@ const initializeWindows = function() { if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR[CONTEXT=MainWindow]')) { new Request({ url: 'api/v2/app/shutdown', + method: 'post', onSuccess: function() { document.write(' QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]

QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]

'); document.close(); diff --git a/src/webui/www/private/scripts/speedslider.js b/src/webui/www/private/scripts/speedslider.js index ae30ed8e0..be27c8f53 100644 --- a/src/webui/www/private/scripts/speedslider.js +++ b/src/webui/www/private/scripts/speedslider.js @@ -35,7 +35,7 @@ MochaUI.extend({ let maximum = 500; new Request({ url: 'api/v2/transfer/uploadLimit', - method: 'post', + method: 'get', data: {}, onSuccess: function(data) { if (data) { @@ -139,7 +139,7 @@ MochaUI.extend({ let maximum = 500; new Request({ url: 'api/v2/transfer/downloadLimit', - method: 'post', + method: 'get', data: {}, onSuccess: function(data) { if (data) { diff --git a/src/webui/www/private/views/rss.html b/src/webui/www/private/views/rss.html index 83a29d448..e4b47ba53 100644 --- a/src/webui/www/private/views/rss.html +++ b/src/webui/www/private/views/rss.html @@ -447,7 +447,7 @@ new Request.JSON({ url: 'api/v2/rss/items', noCache: true, - method: 'post', + method: 'get', data: { withData: true }, diff --git a/src/webui/www/private/views/rssDownloader.html b/src/webui/www/private/views/rssDownloader.html index a1ec0de4a..1bbd1d841 100644 --- a/src/webui/www/private/views/rssDownloader.html +++ b/src/webui/www/private/views/rssDownloader.html @@ -442,7 +442,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also new Request.JSON({ url: 'api/v2/rss/items', noCache: true, - method: 'post', + method: 'get', data: { withData: false }, @@ -630,7 +630,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also new Request.JSON({ url: 'api/v2/rss/matchingArticles', noCache: true, - method: 'post', + method: 'get', data: { ruleName: ruleName }, diff --git a/src/webui/www/private/views/search.html b/src/webui/www/private/views/search.html index 14a296ccd..690f0fd7e 100644 --- a/src/webui/www/private/views/search.html +++ b/src/webui/www/private/views/search.html @@ -647,7 +647,7 @@ new Request.JSON({ url: url, noCache: true, - method: 'post', + method: 'get', data: { id: activeSearchId, limit: maxResults,