From 0fd92198e632e680766b3b17e7783b84e4243046 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Mon, 19 Oct 2020 14:54:22 +0300 Subject: [PATCH] Fix empty request body error --- internal/httpauth/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/httpauth/client.go b/internal/httpauth/client.go index e82db1ef9c..b0de404c83 100644 --- a/internal/httpauth/client.go +++ b/internal/httpauth/client.go @@ -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