MCPcopy Create free account
hub / github.com/imroc/req / SetHeaderNonCanonical

Method SetHeaderNonCanonical

request.go:501–507  ·  view source on GitHub ↗

SetHeaderNonCanonical set a header for the request which key is a non-canonical key (keep case unchanged), only valid for HTTP/1.1.

(key, value string)

Source from the content-addressed store, hash-verified

499// SetHeaderNonCanonical set a header for the request which key is a
500// non-canonical key (keep case unchanged), only valid for HTTP/1.1.
501func (r *Request) SetHeaderNonCanonical(key, value string) *Request {
502 if r.Headers == nil {
503 r.Headers = make(http.Header)
504 }
505 r.Headers[key] = append(r.Headers[key], value)
506 return r
507}
508
509const (
510 // HeaderOderKey is the key of header order, which specifies the order

Callers 2

Calls

no outgoing calls

Tested by 1