Commit 98c90aff authored by Sander van Harmelen's avatar Sander van Harmelen

Merge pull request #41 from mishak87/patch-1

Allow empty token
parents 480adfd0 d6c1e593
...@@ -230,7 +230,9 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request ...@@ -230,7 +230,9 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request
} }
req.Header.Set("Accept", "application/json") req.Header.Set("Accept", "application/json")
req.Header.Set("PRIVATE-TOKEN", c.token) if c.token != "" {
req.Header.Set("PRIVATE-TOKEN", c.token)
}
if c.UserAgent != "" { if c.UserAgent != "" {
req.Header.Set("User-Agent", c.UserAgent) req.Header.Set("User-Agent", c.UserAgent)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment