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

Method AddHeader

client/client.go:423–429  ·  view source on GitHub ↗

AddHeader adds a single header field and its value to the client. These headers apply to all requests.

(key, val string)

Source from the content-addressed store, hash-verified

421
422// AddHeader adds a single header field and its value to the client. These headers apply to all requests.
423func (c *Client) AddHeader(key, val string) *Client {
424 c.mu.Lock()
425 defer c.mu.Unlock()
426
427 c.header.Add(key, val)
428 return c
429}
430
431// SetHeader sets a single header field and its value in the client.
432func (c *Client) SetHeader(key, val string) *Client {

Callers 4

Test_Client_HeaderFunction · 0.45
Test_Request_HeaderFunction · 0.45

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
AddMethod · 0.65

Tested by 4

Test_Client_HeaderFunction · 0.36
Test_Request_HeaderFunction · 0.36