package http

import "github.com/stretchr/testify/http"

Deprecated: Use net/http/httptest instead.

Index

Types

type 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.

func (*TestResponseWriter) Header

func (rw *TestResponseWriter) Header() http.Header

Deprecated: Use net/http/httptest instead.

func (*TestResponseWriter) Write

func (rw *TestResponseWriter) Write(bytes []byte) (int, error)

Deprecated: Use net/http/httptest instead.

func (*TestResponseWriter) WriteHeader

func (rw *TestResponseWriter) WriteHeader(i int)

Deprecated: Use net/http/httptest instead.

type TestRoundTripper

type TestRoundTripper struct {
	mock.Mock
}

Deprecated: Use net/http/httptest instead.

func (*TestRoundTripper) RoundTrip

func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Deprecated: Use net/http/httptest instead.

Source Files

doc.go test_response_writer.go test_round_tripper.go

Version
v1.10.0 (latest)
Published
Nov 12, 2024
Platform
linux/amd64
Imports
2 packages
Last checked
9 hours ago

Tools for package owners.