PeekMultiple returns multiple values of a header field with the same key.
(key string)
| 716 | |
| 717 | // PeekMultiple returns multiple values of a header field with the same key. |
| 718 | func (h *Header) PeekMultiple(key string) []string { |
| 719 | var res []string |
| 720 | byteKey := []byte(key) |
| 721 | for k, value := range h.All() { |
| 722 | if bytes.EqualFold(k, byteKey) { |
| 723 | res = append(res, utils.UnsafeString(value)) |
| 724 | } |
| 725 | } |
| 726 | return res |
| 727 | } |
| 728 | |
| 729 | // AddHeaders adds multiple headers from a map. |
| 730 | func (h *Header) AddHeaders(r map[string][]string) { |