aboutsummaryrefslogtreecommitdiffhomepage
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/client.go3
1 files changed, 2 insertions, 1 deletions
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
}