MCPcopy Create free account
hub / github.com/cli/cli / WithHeader

Function WithHeader

api/client.go:68–72  ·  view source on GitHub ↗

WithHeader sets a header on the request, taking precedence over any header of the same name that the underlying transport would otherwise supply.

(name, value string)

Source from the content-addressed store, hash-verified

66// WithHeader sets a header on the request, taking precedence over any header of the same name
67// that the underlying transport would otherwise supply.
68func WithHeader(name, value string) RequestOption {
69 return func(cfg *requestConfig) {
70 cfg.headers[name] = value
71 }
72}
73
74// WithoutFollowingRedirects stops the request from following redirects. When a redirect is
75// encountered, the request fails with an HTTPError carrying the redirect status code and headers

Callers 15

searchMethod · 0.92
GetCurrentLoginFunction · 0.92
GetScopesFunction · 0.92
fetchContentFunction · 0.92
fetchRawFileFunction · 0.92
getTopicsFunction · 0.92
setTopicsFunction · 0.92
fetchDiffFunction · 0.92
downloadAssetFunction · 0.92
fetchCommitSHAFunction · 0.92
TestRequestWithHeaderFunction · 0.70

Calls

no outgoing calls