SetRestyProxyIfConfigured sets proxy for Resty client if configured
(client *resty.Client)
| 335 | |
| 336 | // SetRestyProxyIfConfigured sets proxy for Resty client if configured |
| 337 | func SetRestyProxyIfConfigured(client *resty.Client) { |
| 338 | // If proxy address is configured, override environment variable settings |
| 339 | if conf.Conf.ProxyAddress != "" { |
| 340 | if proxyURL, err := url.Parse(conf.Conf.ProxyAddress); err == nil { |
| 341 | client.SetProxy(proxyURL.String()) |
| 342 | } |
| 343 | } |
| 344 | } |
no test coverage detected