We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca8064 commit 1c796bfCopy full SHA for 1c796bf
utils/api.go
@@ -9,7 +9,9 @@ import (
9
10
func CallAPIGet(url, token string) ([]byte, error) {
11
req, _ := http.NewRequest("GET", url, nil)
12
- req.Header.Add("Authorization", "Bearer "+token)
+ if token != "" {
13
+ req.Header.Add("Authorization", "Bearer "+token)
14
+ }
15
req.Header.Set("Content-Type", "application/json")
16
17
client := &http.Client{}
0 commit comments