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

Function TestAllowGetMethodPayload

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

Source from the content-addressed store, hash-verified

64}
65
66func TestAllowGetMethodPayload(t *testing.T) {
67 c := tc()
68 resp, err := c.R().SetBody("test").Get("/payload")
69 assertSuccess(t, resp, err)
70 tests.AssertEqual(t, "test", resp.String())
71
72 c.DisableAllowGetMethodPayload()
73 resp, err = c.R().SetBody("test").Get("/payload")
74 assertSuccess(t, resp, err)
75 tests.AssertEqual(t, "", resp.String())
76
77 c.EnableAllowGetMethodPayload()
78 resp, err = c.R().SetBody("test").Get("/payload")
79 assertSuccess(t, resp, err)
80 tests.AssertEqual(t, "test", resp.String())
81}
82
83func TestSetTLSHandshakeTimeout(t *testing.T) {
84 timeout := 2 * time.Second

Callers

nothing calls this directly

Calls 9

AssertEqualFunction · 0.92
tcFunction · 0.85
assertSuccessFunction · 0.85
RMethod · 0.80
GetMethod · 0.45
SetBodyMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…