SetHeader sets a single header field and its value in the client.
(key, val string)
| 430 | |
| 431 | // SetHeader sets a single header field and its value in the client. |
| 432 | func (c *Client) SetHeader(key, val string) *Client { |
| 433 | c.mu.Lock() |
| 434 | defer c.mu.Unlock() |
| 435 | |
| 436 | c.header.Set(key, val) |
| 437 | return c |
| 438 | } |
| 439 | |
| 440 | // AddHeaders adds multiple header fields and their values to the client. |
| 441 | func (c *Client) AddHeaders(h map[string][]string) *Client { |