From aea167f046ef6eb8f87796d97b919d9bb4d2cf35 Mon Sep 17 00:00:00 2001 From: Ignaz Kraft Date: Fri, 9 Sep 2022 16:40:41 +0200 Subject: [PATCH] Log into qBittorrent using HTTP-POST --- server/services/qBittorrent/clientRequestManager.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/services/qBittorrent/clientRequestManager.ts b/server/services/qBittorrent/clientRequestManager.ts index 597abbb88..1faca82dd 100644 --- a/server/services/qBittorrent/clientRequestManager.ts +++ b/server/services/qBittorrent/clientRequestManager.ts @@ -1,3 +1,5 @@ +import {URLSearchParams} from 'url'; + import axios from 'axios'; import FormData from 'form-data'; @@ -59,12 +61,13 @@ class ClientRequestManager { const {url, username, password} = connectionSettings; return axios - .get(`${url}/api/v2/auth/login`, { - params: { + .post( + `${url}/api/v2/auth/login`, + new URLSearchParams({ username, password, - }, - }) + }), + ) .then((res) => { const cookies = res.headers['set-cookie'];