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

Method SetHeaders

client/client.go:452–458  ·  view source on GitHub ↗

SetHeaders method sets multiple headers field and its values at one go in the client instance. These headers will be applied to all requests created from this client instance. Also it can be overridden at request level headers options.

(h map[string]string)

Source from the content-addressed store, hash-verified

450// These headers will be applied to all requests created from this client instance. Also it can be
451// overridden at request level headers options.
452func (c *Client) SetHeaders(h map[string]string) *Client {
453 c.mu.Lock()
454 defer c.mu.Unlock()
455
456 c.header.SetHeaders(h)
457 return c
458}
459
460// Param returns all values of the specified query parameter.
461func (c *Client) Param(key string) []string {

Callers 7

Test_Client_HeaderFunction · 0.45
Test_Request_HeaderFunction · 0.45
setConfigToRequestFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by 6

Test_Client_HeaderFunction · 0.36
Test_Request_HeaderFunction · 0.36