From 34ce1142313b74e21a74c08c6dbd8d4312d7e336 Mon Sep 17 00:00:00 2001 From: Nicolas Carlier Date: Sun, 25 Feb 2018 19:49:08 +0000 Subject: Add Nunux Keeper integration --- http/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http') diff --git a/http/client.go b/http/client.go index 401d621..9bcd14e 100644 --- a/http/client.go +++ b/http/client.go @@ -149,11 +149,12 @@ func (c *Client) buildRequest(method string, body io.Reader) (*http.Request, err return nil, err } + request.Header = c.buildHeaders() + if c.username != "" && c.password != "" { request.SetBasicAuth(c.username, c.password) } - request.Header = c.buildHeaders() return request, nil } -- cgit v1.2.3