This commit is contained in:
xxj
2024-07-05 18:24:24 +08:00
parent 5914822fe2
commit 9b12e86720

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
@@ -85,7 +86,7 @@ func SendGet(url, params string, obj interface{}) bool {
return false
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
mylog.Error(err)
return false