MCPcopy Index your code
hub / github.com/imroc/req / SetProxy

Method SetProxy

client.go:1027–1030  ·  view source on GitHub ↗

SetProxy set the proxy function.

(proxy func(*http.Request) (*urlpkg.URL, error))

Source from the content-addressed store, hash-verified

1025
1026// SetProxy set the proxy function.
1027func (c *Client) SetProxy(proxy func(*http.Request) (*urlpkg.URL, error)) *Client {
1028 c.Transport.SetProxy(proxy)
1029 return c
1030}
1031
1032// OnError set the error hook which will be executed if any error returned,
1033// even if the occurs before request is sent (e.g. invalid URL).

Callers 3

SetProxyURLMethod · 0.95
TestSetProxyFunction · 0.45
SetProxyFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestSetProxyFunction · 0.36