qbittorrent/exporter: Replace deprecated calls

This commit is contained in:
Simon Bruder 2024-01-13 15:38:25 +01:00
parent 10b8d432d5
commit ab600a2b16
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 Simon Bruder <simon@sbruder.de> // SPDX-FileCopyrightText: 2022-2024 Simon Bruder <simon@sbruder.de>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
@ -7,7 +7,7 @@ package main
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"io/ioutil" "io"
"log" "log"
"net" "net"
"net/http" "net/http"
@ -119,7 +119,7 @@ func (c ApiClient) doRequest(group string, method string, parameters url.Values)
log.Println(err) log.Println(err)
return []byte{}, err return []byte{}, err
} }
bodyBytes, err := ioutil.ReadAll(res.Body) bodyBytes, err := io.ReadAll(res.Body)
if err != nil { if err != nil {
return []byte{}, err return []byte{}, err
} }