import "github.com/stretchr/testify/http"
Deprecated: Use net/http/httptest instead.
Types
type TestResponseWriter
Source: http/test_response_writer.go:8
Deprecated: Use net/http/httptest instead.
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
}Fields
StatusCode intStatusCode is the last int written by the call to WriteHeader(int)
Output stringOutput is a string containing the written bytes using the Write([]byte) func.
func (rw *TestResponseWriter) Header() http.Header
Source: http/test_response_writer.go:21
Deprecated: Use net/http/httptest instead.
func (rw *TestResponseWriter) Write(bytes []byte) (int, error)
Source: http/test_response_writer.go:31
Deprecated: Use net/http/httptest instead.
func (rw *TestResponseWriter) WriteHeader(i int)
Source: http/test_response_writer.go:47
Deprecated: Use net/http/httptest instead.
type TestRoundTripper
Source: http/test_round_tripper.go:10
Deprecated: Use net/http/httptest instead.
type TestRoundTripper struct {
mock.Mock
}Fields
mock.Mock
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
Source: http/test_round_tripper.go:15
Deprecated: Use net/http/httptest instead.