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

Function WithHeader

api/client.go:69–73  ·  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

67// WithHeader sets a header on the request, taking precedence over any header of the same name
68// that the underlying transport would otherwise supply.
69func WithHeader(name, value string) RequestOption {
70 return func(cfg *requestConfig) {
71 cfg.headers[name] = value
72 }
73}
74
75// WithoutFollowingRedirects stops the request from following redirects. When a redirect is
76// 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
OpenStreamMethod · 0.92
fetchDiffFunction · 0.92
downloadAssetFunction · 0.92
fetchCommitSHAFunction · 0.92
EventsFeaturesMethod · 0.92

Calls

no outgoing calls