We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f71cf28 commit 2f0aefbCopy full SHA for 2f0aefb
client.go
@@ -82,11 +82,15 @@ func (c *Client) Ping() bool {
82
return true
83
}
84
85
-// TokenAuth sets authorization headers for subsequent requests.
86
-func (c *Client) TokenAuth(token string) *Client {
87
- c.Transport.header.Set("Authorization", "Bearer "+token)
88
- c.Transport.header.Set("apikey", token)
+// SetApiKey sets api key header for subsequent requests.
+func (c *Client) SetApiKey(apiKey string) *Client {
+ c.Transport.header.Set("apikey", apiKey)
+ return c
89
+}
90
91
+// SetAuthToken sets authorization header for subsequent requests.
92
+func (c *Client) SetAuthToken(authToken string) *Client {
93
+ c.Transport.header.Set("Authorization", "Bearer "+authToken)
94
return c
95
96
0 commit comments