Commit d6c1e593 authored by Michal Gebauer's avatar Michal Gebauer

Allow empty token

parent 480adfd0
......@@ -230,7 +230,9 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request
}
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 != "" {
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