AddHeader adds a single header field and its value to the client. These headers apply to all requests.
(key, val string)
| 421 | |
| 422 | // AddHeader adds a single header field and its value to the client. These headers apply to all requests. |
| 423 | func (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. |
| 432 | func (c *Client) SetHeader(key, val string) *Client { |