MCPcopy Create free account
hub / github.com/imroc/req / SetCommonBearerAuthToken

Method SetCommonBearerAuthToken

client.go:850–852  ·  view source on GitHub ↗

SetCommonBearerAuthToken set the bearer auth token for requests fired from the client.

(token string)

Source from the content-addressed store, hash-verified

848
849// SetCommonBearerAuthToken set the bearer auth token for requests fired from the client.
850func (c *Client) SetCommonBearerAuthToken(token string) *Client {
851 return c.SetCommonHeader(header.Authorization, "Bearer "+token)
852}
853
854// SetCommonBasicAuth set the basic auth for requests fired from
855// the client.

Callers 2

SetCommonBearerAuthTokenFunction · 0.80

Calls 1

SetCommonHeaderMethod · 0.95

Tested by 1