mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 18:00:31 -06:00
Replace json decoder with io.ReadAll (#57178)
This commit is contained in:
parent
b997bc4200
commit
0b72c36527
@ -275,10 +275,7 @@ func postRequest(cfg packaging.PublishConfig, pth string, obj interface{}, descr
|
||||
}
|
||||
}()
|
||||
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||
var body []byte
|
||||
if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
|
||||
return err
|
||||
}
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user