MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / SetRestyProxyIfConfigured

Function SetRestyProxyIfConfigured

internal/net/util.go:337–344  ·  view source on GitHub ↗

SetRestyProxyIfConfigured sets proxy for Resty client if configured

(client *resty.Client)

Source from the content-addressed store, hash-verified

335
336// SetRestyProxyIfConfigured sets proxy for Resty client if configured
337func 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}

Callers 2

InitClientFunction · 0.92
NewRestyClientFunction · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected