thttp

package
v0.0.0-...-6a56cfb Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(t testing.TB, url string) (resp *http.Response)
func Head(t testing.TB, url string) (resp *http.Response)

func ListenAndServe

func ListenAndServe(t testing.TB, addr string, handler http.Handler)

func ListenAndServeTLS

func ListenAndServeTLS(t testing.TB, addr, certFile, keyFile string, handler http.Handler)

func NewRequest

func NewRequest(t testing.TB, method, url string, body io.Reader) *http.Request

func NewRequestWithContext

func NewRequestWithContext(t testing.TB, ctx context.Context, method, url string, body io.Reader) *http.Request

func ParseTime

func ParseTime(t testing.TB, text string) time.Time

func Post

func Post(t testing.TB, url, contentType string, body io.Reader) (resp *http.Response)

func PostForm

func PostForm(t testing.TB, url string, data url.Values) (resp *http.Response)

func ProxyFromEnvironment

func ProxyFromEnvironment(t testing.TB, req *http.Request) *url.URL

func ReadRequest

func ReadRequest(t testing.TB, b *bufio.Reader) *http.Request

func ReadResponse

func ReadResponse(t testing.TB, r *bufio.Reader, req *http.Request) *http.Response

func Serve

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

func ServeTLS

func ServeTLS(t testing.TB, l net.Listener, handler http.Handler, certFile, keyFile string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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