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

Function WithUserAgent

config/http_config.go:560–564  ·  view source on GitHub ↗

WithUserAgent allows setting the user agent.

(ua string)

Source from the content-addressed store, hash-verified

558
559// WithUserAgent allows setting the user agent.
560func WithUserAgent(ua string) HTTPClientOption {
561 return httpClientOptionFunc(func(opts *httpClientOptions) {
562 opts.userAgent = ua
563 })
564}
565
566// WithHost allows setting the host header.
567func WithHost(host string) HTTPClientOption {

Callers 1

TestOAuth2UserAgentFunction · 0.85

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by 1

TestOAuth2UserAgentFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…