httptest

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*nethttptest.Server
}

Server wraps net/httptest.Server to listen on all network interfaces

func NewServer

func NewServer(handler http.Handler) *Server

NewServer starts a new httptest server that listens on all interfaces, contrary to the standard net/httptest.Server that listens only on localhost. This is useful when you want to access the test http server from within a docker container.

func NewUnStartedServer added in v0.23.2

func NewUnStartedServer(handler http.Handler) *Server

Jump to

Keyboard shortcuts

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