Remove 'no cache' directive for POST requests

The response for POST request is only cachable under a specific condition and
qbt doesn't use it.
https://developer.mozilla.org/en-US/docs/Glossary/Cacheable
This commit is contained in:
Chocobo1
2024-02-09 14:56:17 +08:00
parent f7e9ff0fb0
commit 8ef99b336c
20 changed files with 15 additions and 36 deletions

View File

@@ -90,8 +90,8 @@ window.qBittorrent.PropGeneral = (function() {
const url = new URI('api/v2/torrents/properties?hash=' + current_id);
new Request.JSON({
url: url,
noCache: true,
method: 'get',
noCache: true,
onFailure: function() {
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
clearTimeout(loadTorrentDataTimer);
@@ -223,8 +223,8 @@ window.qBittorrent.PropGeneral = (function() {
const piecesUrl = new URI('api/v2/torrents/pieceStates?hash=' + current_id);
new Request.JSON({
url: piecesUrl,
noCache: true,
method: 'get',
noCache: true,
onFailure: function() {
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
clearTimeout(loadTorrentDataTimer);