http

package
v0.0.0-...-bf444b6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponseBody

func CheckResponseBody(t *testing.T, body io.Reader, expected any, dst any)

CheckResponseBody is a utility function to check the response body

func CheckResponseCode

func CheckResponseCode(t *testing.T, expected, actual int)

CheckResponseCode is a utility function to check the response code of the response

func ExecuteRequest

func ExecuteRequest(req *http.Request, handler http.HandlerFunc) *httptest.ResponseRecorder

ExecuteRequest creates a new ResponseRecorder then executes the request by calling ServeHTTP in the controller after which the controller writes the response to the response recorder which we can then inspect.

func GetHTTPClient

func GetHTTPClient() *http.Client

GetHTTPClient returns a pre-configured HTTP client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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