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)
| 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. |
| 452 | func (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. |
| 461 | func (c *Client) Param(key string) []string { |