http
v1.12.1
github.com/stretchr/testify/http
Documentation
pkg.go.dev ↗Deprecated: Use net/http/httptest instead.
Types
TestResponseWriter
type TestResponseWriter struct {
// StatusCode is the last int written by the call to WriteHeader(int)
StatusCode int
// Output is a string containing the written bytes using the Write([]byte) func.
Output string
// contains filtered or unexported fields
}
Deprecated: Use net/http/httptest instead.
TestResponseWriter.Header
func (rw *TestResponseWriter) Header() http.Header
Deprecated: Use net/http/httptest instead.
TestResponseWriter.Write
func (rw *TestResponseWriter) Write(bytes []byte) (int, error)
Deprecated: Use net/http/httptest instead.
TestResponseWriter.WriteHeader
func (rw *TestResponseWriter) WriteHeader(i int)
Deprecated: Use net/http/httptest instead.
TestRoundTripper
type TestRoundTripper struct {
mock.Mock
}
Deprecated: Use net/http/httptest instead.
TestRoundTripper.RoundTrip
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
Deprecated: Use net/http/httptest instead.