From 9ff8e33634d856adcee5c2270f6a97e84e94f729 Mon Sep 17 00:00:00 2001 From: misha-plus Date: Sun, 10 Jun 2018 14:01:51 +0500 Subject: [PATCH] fix authorization --- requests.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requests.go b/requests.go index fd7bbea..17b5515 100644 --- a/requests.go +++ b/requests.go @@ -13,14 +13,14 @@ func (c *Client) req(method, path string, body io.Reader, intercept func(*http.R return nil, err } + c.auth.Authorize(c, method, path) + for k, vals := range c.headers { for _, v := range vals { r.Header.Add(k, v) } } - c.auth.Authorize(c, method, path) - if intercept != nil { intercept(r) }