Replies: 1 comment
-
Can someone tell me how to correctly call the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day. I'm writing qBt GUI for Mac in Swift. Authorization has been implemented. /api/v2/sync/maindata?rid=xx , webapiVersion, buildInfo and some other methods work. The problem occurred with stopping, resuming, and starting torrents. When I call pause, resume and delete methods I always get a Bad Request from the server. Server response:
Bad Request Optional(<NSHTTPURLResponse: 0x600001fe5200> { URL: http://192.168.1.1:9080/api/v2/torrents/resume?hashes=4e00cbda4519c25e2aeea9c9b59983fbe91c408c } { Status Code: 400, Headers { Connection = ( "keep-alive" ); "Content-Length" = ( 11 ); "Content-Type" = ( "text/plain; charset=UTF-8" ); Date = ( "Wed, 21 Feb 2024 08:12:50 GMT" ); "content-security-policy" = ( "frame-ancestors 'self';" ); "x-content-type-options" = ( nosniff ); "x-frame-options" = ( SAMEORIGIN ); "x-xss-protection" = ( "1; mode=block" ); } })
The torrent hash is correct.
Please tell me what am I missing?
P.S. As an experiment, I disabled authorization for local clients in qBt. When I call curl -X POST "http://192.168.1.1:9080/api/v2/torrents/resume?hashes=4e00cbda4519c25e2aeea9c9b59983fbe91c408c" in the terminal I also get Bad Request error.
Beta Was this translation helpful? Give feedback.
All reactions