Header returns all header values associated with the provided key.
(key string)
| 413 | |
| 414 | // Header returns all header values associated with the provided key. |
| 415 | func (c *Client) Header(key string) []string { |
| 416 | c.mu.RLock() |
| 417 | defer c.mu.RUnlock() |
| 418 | |
| 419 | return c.header.PeekMultiple(key) |
| 420 | } |
| 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 { |