Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserAgentTransport ¶
type UserAgentTransport struct { // Base is the base RoundTripper used to make HTTP requests. // If nil, http.DefaultTransport is used. Base http.RoundTripper // UserAgent is the value of the User-Agent header UserAgent string }
UserAgentTransport wraps a given http.RoundTripper and sets a custom User-Agent header for all HTTP requests.
func NewUserAgentTransport ¶
func NewUserAgentTransport(base http.RoundTripper, userAgent string) *UserAgentTransport
NewUserAgentTransport creates a new UserAgentTransport, which wraps a given http.RoundTripper and sets a custom User-Agent header for all HTTP requests.
Click to show internal directories.
Click to hide internal directories.