MCPcopy Create free account
hub / github.com/prometheus/common / WithUserAgent

Function WithUserAgent

config/http_config.go:467–471  ·  view source on GitHub ↗

WithUserAgent allows setting the user agent.

(ua string)

Source from the content-addressed store, hash-verified

465
466// WithUserAgent allows setting the user agent.
467func WithUserAgent(ua string) HTTPClientOption {
468 return func(opts *httpClientOptions) {
469 opts.userAgent = ua
470 }
471}
472
473// NewClient returns a http.Client using the specified http.RoundTripper.
474func newClient(rt http.RoundTripper) *http.Client {

Callers 1

TestOAuth2UserAgentFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestOAuth2UserAgentFunction · 0.68