MCPcopy
hub / github.com/stretchr/testify / httpReadBody

Function httpReadBody

assert/http_assertions_test.go:15–19  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

13}
14
15func httpReadBody(w http.ResponseWriter, r *http.Request) {
16 _, _ = io.Copy(io.Discard, r.Body)
17 w.WriteHeader(http.StatusOK)
18 _, _ = w.Write([]byte("hello"))
19}
20
21func httpRedirect(w http.ResponseWriter, r *http.Request) {
22 w.WriteHeader(http.StatusTemporaryRedirect)

Callers

nothing calls this directly

Calls 3

CopyMethod · 0.80
WriteHeaderMethod · 0.80
WriteMethod · 0.80

Tested by

no test coverage detected