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

Method client

internal/featuredetection/feature_detection.go:221–226  ·  view source on GitHub ↗

client returns the HTTP client for detection requests. If the detector caches results, the client also caches responses with the given extra status codes, which are not cached by default.

(extraStatuses ...int)

Source from the content-addressed store, hash-verified

219// client returns the HTTP client for detection requests. If the detector caches results, the client also caches
220// responses with the given extra status codes, which are not cached by default.
221func (d *detector) client(extraStatuses ...int) *http.Client {
222 if d.cacheTTL <= 0 {
223 return d.httpClient
224 }
225 return api.NewCachedHTTPClientWithStatuses(d.httpClient, d.cacheTTL, extraStatuses...)
226}
227
228func (d *detector) IssueFeatures() (IssueFeatures, error) {
229 if !ghauth.IsEnterprise(d.host) {

Callers 12

IssueFeaturesMethod · 0.95
PullRequestFeaturesMethod · 0.95
RepositoryFeaturesMethod · 0.95
ProjectsV1Method · 0.95
ProjectFeaturesMethod · 0.95
SearchFeaturesMethod · 0.95
ReleaseFeaturesMethod · 0.95
ActionsFeaturesMethod · 0.95
AuthFeaturesMethod · 0.95
EventsFeaturesMethod · 0.95
TestDetectorClientFunction · 0.95
doMethod · 0.45

Calls 1

Tested by 1

TestDetectorClientFunction · 0.76