MCPcopy
hub / github.com/gofiber/fiber / SetUserAgent

Method SetUserAgent

client/client.go:532–538  ·  view source on GitHub ↗

SetUserAgent sets the User-Agent header for the client.

(ua string)

Source from the content-addressed store, hash-verified

530
531// SetUserAgent sets the User-Agent header for the client.
532func (c *Client) SetUserAgent(ua string) *Client {
533 c.mu.Lock()
534 defer c.mu.Unlock()
535
536 c.userAgent = ua
537 return c
538}
539
540// SetReferer sets the Referer header for the client.
541func (c *Client) SetReferer(r string) *Client {

Callers 7

Test_Client_UserAgentFunction · 0.45
parserRequestHeaderFunction · 0.45
Test_Request_UAFunction · 0.45
setConfigToRequestFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by 5

Test_Client_UserAgentFunction · 0.36
Test_Request_UAFunction · 0.36