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

Function testDisableAutoReadResponse

client_test.go:581–594  ·  view source on GitHub ↗
(t *testing.T, c *Client)

Source from the content-addressed store, hash-verified

579}
580
581func testDisableAutoReadResponse(t *testing.T, c *Client) {
582 c.DisableAutoReadResponse()
583 resp, err := c.R().Get("/")
584 assertSuccess(t, resp, err)
585 tests.AssertEqual(t, "", resp.String())
586 result, err := resp.ToString()
587 tests.AssertNoError(t, err)
588 tests.AssertEqual(t, "TestGet: text response", result)
589
590 resp, err = c.R().Get("/")
591 assertSuccess(t, resp, err)
592 _, err = io.ReadAll(resp.Body)
593 tests.AssertNoError(t, err)
594}
595
596func testEnableDumpAll(t *testing.T, fn func(c *Client) (de dumpExpected)) {
597 testDump := func(c *Client) {

Callers

nothing calls this directly

Calls 8

AssertEqualFunction · 0.92
AssertNoErrorFunction · 0.92
assertSuccessFunction · 0.85
RMethod · 0.80
ToStringMethod · 0.80
GetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…