Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: adding the possibility to modify the User-Agent #336

Closed
laxa opened this issue Apr 26, 2022 · 0 comments
Closed

Feature request: adding the possibility to modify the User-Agent #336

laxa opened this issue Apr 26, 2022 · 0 comments

Comments

@laxa
Copy link
Contributor

laxa commented Apr 26, 2022

Hello,

I am wondering if it would possible to add an option to modify the User-Agent used. By default, it is set to Ruby WinRM Client in https://github.com/WinRb/WinRM/blob/master/lib/winrm/http/transport.rb#L28.
The only correct way to redefine it entirely (and to avoid the ruby and library version being included in the User-Agent) is to use the default_header options like this:

HTTPClient.new(default_header: {"User-Agent":"Just another User-Agent"})

I am not familiar with ruby programming, but, if no one is keen to implement it, I could give it a try.

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant