MCPcopy
hub / github.com/gofiber/fiber / PeekMultiple

Method PeekMultiple

client/request.go:718–727  ·  view source on GitHub ↗

PeekMultiple returns multiple values of a header field with the same key.

(key string)

Source from the content-addressed store, hash-verified

716
717// PeekMultiple returns multiple values of a header field with the same key.
718func (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.
730func (h *Header) AddHeaders(r map[string][]string) {

Callers 2

HeaderMethod · 0.80
HeaderMethod · 0.80

Calls 1

AllMethod · 0.65

Tested by

no test coverage detected