cgitest

package
v0.0.0-...-0bbbf19 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(t testing.TB) *http.Request

Request returns the HTTP request as represented in the current environment. This assumes the current program is being run by a web server in a CGI environment. The returned Request's Body is populated, if applicable.

func RequestFromMap

func RequestFromMap(t testing.TB, params map[string]string) *http.Request

RequestFromMap creates an http.Request from CGI variables. The returned Request's Body field is not populated.

func Serve

func Serve(t testing.TB, handler http.Handler)

Serve executes the provided [Handler] on the currently active CGI request, if any. If there's no current CGI environment an error is returned. The provided handler may be nil to use http.DefaultServeMux.

Types

This section is empty.

Jump to

Keyboard shortcuts

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