Only set Authorization header when AccessToken is set
This commit is contained in:
parent
45d75e8085
commit
7745e19ff7
|
@ -92,7 +92,10 @@ func (c *Client) streaming(ctx context.Context, p string, params url.Values) (ch
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req = req.WithContext(ctx)
|
req = req.WithContext(ctx)
|
||||||
|
|
||||||
|
if c.Config.AccessToken != "" {
|
||||||
req.Header.Set("Authorization", "Bearer "+c.Config.AccessToken)
|
req.Header.Set("Authorization", "Bearer "+c.Config.AccessToken)
|
||||||
|
}
|
||||||
|
|
||||||
q := make(chan Event)
|
q := make(chan Event)
|
||||||
go func() {
|
go func() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user