mirror of
https://github.com/zoriya/flood.git
synced 2025-12-05 23:06:20 +00:00
server: qBittorrent: log in using POST method (#594)
Bug: #589, #592 Ref: qbittorrent/qBittorrent#17548, qbittorrent/qBittorrent#17549, qbittorrent/qBittorrent#17563
This commit is contained in:
@@ -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'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user