httptest

package
v0.0.0-...-fab57c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package httptest provides a mockable wrapper for net/http/httptest.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) NewRecorder

func (*Impl) NewRecorder() *httptest.ResponseRecorder

func (*Impl) NewRequest

func (*Impl) NewRequest(method string, target string, body io.Reader) *http.Request

func (*Impl) NewServer

func (*Impl) NewServer(handler http.Handler) *httptest.Server

func (*Impl) NewTLSServer

func (*Impl) NewTLSServer(handler http.Handler) *httptest.Server

func (*Impl) NewUnstartedServer

func (*Impl) NewUnstartedServer(handler http.Handler) *httptest.Server

type Interface

type Interface interface {
	NewRecorder() *httptest.ResponseRecorder
	NewRequest(method string, target string, body io.Reader) *http.Request
	NewServer(handler http.Handler) *httptest.Server
	NewTLSServer(handler http.Handler) *httptest.Server
	NewUnstartedServer(handler http.Handler) *httptest.Server
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL