MCPcopy Index your code
hub / github.com/imroc/req / SetUserAgent

Method SetUserAgent

client.go:845–847  ·  view source on GitHub ↗

SetUserAgent set the "User-Agent" header for requests fired from the client.

(userAgent string)

Source from the content-addressed store, hash-verified

843
844// SetUserAgent set the "User-Agent" header for requests fired from the client.
845func (c *Client) SetUserAgent(userAgent string) *Client {
846 return c.SetCommonHeader(header.UserAgent, userAgent)
847}
848
849// SetCommonBearerAuthToken set the bearer auth token for requests fired from the client.
850func (c *Client) SetCommonBearerAuthToken(token string) *Client {

Callers 2

TestSetUserAgentFunction · 0.80
SetUserAgentFunction · 0.80

Calls 1

SetCommonHeaderMethod · 0.95

Tested by 1

TestSetUserAgentFunction · 0.64