ioutil.ReadAll, for now
This commit is contained in:
parent
5584414f53
commit
2b9a62b4b9
1 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,7 @@ package client
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"reflect"
|
||||
|
@ -92,7 +92,8 @@ func CallEndSessionEndpoint(request interface{}, authFn interface{}, caller EndS
|
|||
resp, err := client.Do(req)
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode < 200 || resp.StatusCode >= 400 {
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
// TODO: switch to io.ReadAll when go1.15 support is retired
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue