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

Method SetCommonHeaderNonCanonical

client.go:903–909  ·  view source on GitHub ↗

SetCommonHeaderNonCanonical set a header for requests fired from the client 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

901// the client which key is a non-canonical key (keep case unchanged),
902// only valid for HTTP/1.1.
903func (c *Client) SetCommonHeaderNonCanonical(key, value string) *Client {
904 if c.Headers == nil {
905 c.Headers = make(http.Header)
906 }
907 c.Headers[key] = append(c.Headers[key], value)
908 return c
909}
910
911// SetCommonHeadersNonCanonical set headers for requests fired from the
912// client which key is a non-canonical key (keep case unchanged), only

Calls

no outgoing calls

Tested by 2