Skip to content

Commit

Permalink
Fix empty request body error
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Oct 19, 2020
1 parent 43b289d commit 0fd9219
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/httpauth/client.go
Expand Up @@ -140,6 +140,9 @@ func (c *Client) do(client *http.Client, req *http.Request) (*http.Response, err
if err := resp.Body.Close(); err != nil {
log.WithError(err).Warn("Failed to close HTTP response body")
}

req.Body = ioutil.NopCloser(bytes.NewBuffer(body))

resp, err = c.doRequest(client, req, body)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0fd9219

Please sign in to comment.