Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into data-source-by-name
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez authored Oct 5, 2023
2 parents 1cdcba1 + 93559f4 commit 45f6b70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ func (c *Client) request(method, requestPath string, query url.Values, body []by
continue
}

defer resp.Body.Close()

// read the body (even on non-successful HTTP status codes), as that's what the unit tests expect
bodyContents, err = ioutil.ReadAll(resp.Body)
resp.Body.Close() //nolint:errcheck

// if there was an error reading the body, try again
if err != nil {
Expand Down

0 comments on commit 45f6b70

Please sign in to comment.