@@ -367,9 +367,10 @@ class QBittorrentClient(
367
367
@Throws(QBittorrentException ::class , CancellationException ::class )
368
368
suspend fun pauseTorrents (hashes : List <String > = allList) {
369
369
http
370
- .get(" ${config.baseUrl} /api/v2/torrents/pause" ) {
371
- parameter(" hashes" , hashes.joinToString(" |" ))
372
- }
370
+ .submitForm(
371
+ " ${config.baseUrl} /api/v2/torrents/pause" ,
372
+ formParameters = Parameters .build { append(" hashes" , hashes.joinToString(" |" )) }
373
+ )
373
374
.orThrow()
374
375
}
375
376
@@ -381,9 +382,10 @@ class QBittorrentClient(
381
382
@Throws(QBittorrentException ::class , CancellationException ::class )
382
383
suspend fun resumeTorrents (hashes : List <String > = allList) {
383
384
http
384
- .get(" ${config.baseUrl} /api/v2/torrents/resume" ) {
385
- parameter(" hashes" , hashes.joinToString(" |" ))
386
- }
385
+ .submitForm(
386
+ " ${config.baseUrl} /api/v2/torrents/resume" ,
387
+ formParameters = Parameters .build { append(" hashes" , hashes.joinToString(" |" )) }
388
+ )
387
389
.orThrow()
388
390
}
389
391
@@ -411,19 +413,21 @@ class QBittorrentClient(
411
413
@Throws(QBittorrentException ::class , CancellationException ::class )
412
414
suspend fun recheckTorrents (hashes : List <String > = allList) {
413
415
http
414
- .get(" ${config.baseUrl} /api/v2/torrents/recheck" ) {
415
- parameter(" hashes" , hashes.joinToString(" |" ))
416
- }
416
+ .submitForm(
417
+ " ${config.baseUrl} /api/v2/torrents/recheck" ,
418
+ formParameters = Parameters .build { append(" hashes" , hashes.joinToString(" |" )) }
419
+ )
417
420
.orThrow()
418
421
}
419
422
420
423
/* * Reannounce a torrent. */
421
424
@Throws(QBittorrentException ::class , CancellationException ::class )
422
425
suspend fun reannounceTorrents (hashes : List <String > = allList) {
423
426
http
424
- .get(" ${config.baseUrl} /api/v2/torrents/reannounce" ) {
425
- parameter(" hashes" , hashes.joinToString(" |" ))
426
- }
427
+ .submitForm(
428
+ " ${config.baseUrl} /api/v2/torrents/reannounce" ,
429
+ formParameters = Parameters .build { append(" hashes" , hashes.joinToString(" |" )) }
430
+ )
427
431
.orThrow()
428
432
}
429
433
0 commit comments