httptest

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPClient

func HTTPClient(handler http.Handler) *http.Client

HTTPClient returns a client that serves requests through handler in the caller's goroutine.

func NewServer

func NewServer(t *testing.T, handler http.Handler) *httptest.Server

NewServer starts an httptest server backed by net.Pipe.

Types

type Server

type Server = httptest.Server

Server is re-exported so callers importing this package don't also need to import the stdlib net/http/httptest just to name the return type.

Jump to

Keyboard shortcuts

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