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

Function WithUserAgent

config/http_config.go:558–562  ·  view source on GitHub ↗

WithUserAgent allows setting the user agent.

(ua string)

Source from the content-addressed store, hash-verified

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

Callers 1

TestOAuth2UserAgentFunction · 0.85

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by 1

TestOAuth2UserAgentFunction · 0.68