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

Function oauthAppHttpClientFunc

pkg/cmd/factory/default.go:246–257  ·  view source on GitHub ↗
(appVersion string, invokingAgent string, telemetryDisabler ghtelemetry.Disabler)

Source from the content-addressed store, hash-verified

244}
245
246func oauthAppHttpClientFunc(appVersion string, invokingAgent string, telemetryDisabler ghtelemetry.Disabler) func() (*http.Client, error) {
247 return func() (*http.Client, error) {
248 return api.NewHTTPClient(api.HTTPClientOptions{
249 AppVersion: appVersion,
250 InvokingAgent: invokingAgent,
251 SkipDefaultHeaders: true,
252 TelemetryDisabler: telemetryDisabler,
253 // Leave Log nil and ignore verbose tracing: request bodies contain live credentials.
254 LogHeadlineOnly: true,
255 })
256 }
257}
258
259func plainHttpClientFunc(ios *iostreams.IOStreams, appVersion string, invokingAgent string, telemetryDisabler ghtelemetry.Disabler) func() (*http.Client, error) {
260 return func() (*http.Client, error) {

Callers 2

NewFunction · 0.85

Calls 1

NewHTTPClientFunction · 0.92