influxdata / influxdb-client-go

InfluxDB 2 Go Client
MIT License
609 stars 116 forks source link

feat: add User-Agent header overwrite possibility #313

Closed yohan-couppey closed 2 years ago

yohan-couppey commented 2 years ago

This is a proposal to add the possibility to overwrite the User-Agent field when we do requests.

Example of use :

    c := client.NewClient( fmt.Sprintf("https://%s:%s", "influx_url", "influx_proxy_port"), "influx_token" )
    // Ensures background processes finishes
    defer c.Close()

    c.HTTPService().SetUserAgent("custom_user_agent")
yohan-couppey commented 2 years ago

The whole code was not committed, I am sorry for the inconvenience and I will make a new pull request when it's done