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

Function TestSetProxy

client_test.go:175–182  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func TestSetProxy(t *testing.T) {
176 u, _ := url.Parse("http://dummy.proxy.local")
177 proxy := http.ProxyURL(u)
178 c := tc().SetProxy(proxy)
179 uu, err := c.Proxy(nil)
180 tests.AssertNoError(t, err)
181 tests.AssertEqual(t, u.String(), uu.String())
182}
183
184func TestSetCommonContentType(t *testing.T) {
185 c := tc().SetCommonContentType(header.JsonContentType)

Callers

nothing calls this directly

Calls 6

AssertNoErrorFunction · 0.92
AssertEqualFunction · 0.92
tcFunction · 0.85
ParseMethod · 0.80
SetProxyMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…