http_test

package module
v0.0.0-...-1d982ce Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 4 Imported by: 0

README

http-test

test http routes '-'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, rq *[]Request, handler *Handler)

Types

type Handler

type Handler func(w http.ResponseWriter, req *http.Request)

type Request

type Request struct {

	// Subtest Name
	Name string

	// Request Method
	Method string

	// Request Path
	Path string

	// Request Body
	Body string

	// Request Headers
	Headers *map[string]string

	// Response Body
	Response string

	// Response Code
	ResponseCode int

	// Response headers
	ResponseHeaders *map[string]string
}

Jump to

Keyboard shortcuts

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