mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 16:56:39 +00:00
[shared] allow setting a user agent for the rest client (#5037)
This commit is contained in:
@@ -42,3 +42,10 @@ func WithAuthHeader(value string) option {
|
||||
c.authHeader = value
|
||||
}
|
||||
}
|
||||
|
||||
// WithUserAgent sets a custom User-Agent header for HTTP requests
|
||||
func WithUserAgent(userAgent string) option {
|
||||
return func(c *Client) {
|
||||
c.userAgent = userAgent
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user