Remove dependency of deprecated ioutil package

This commit is contained in:
Deluan
2021-07-20 20:00:58 -04:00
parent 774ad65155
commit 8afa2cd833
23 changed files with 77 additions and 86 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"encoding/base64"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"strings"
"time"
@@ -71,7 +70,7 @@ func (c *CachedHTTPClient) serializeReq(req *http.Request) string {
URL: req.URL.String(),
}
if req.Body != nil {
bodyData, _ := ioutil.ReadAll(req.Body)
bodyData, _ := io.ReadAll(req.Body)
bodyStr := base64.StdEncoding.EncodeToString(bodyData)
data.Body = &bodyStr
}