The highest tagged major version is
v2.
package
Version:
v0.0.0-...-abf58de
Opens a new window with list of versions in this module.
Published: Jun 10, 2023
License: ISC
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ht contains HTTP testing utilities.
AsJSON unmarshals the response body as JSON. It panics if the unmarshaling
fails.
type Response struct {
Status int
Body []byte
}
Response is a minimal HTTP response.
Server is a test server that can be used to test HTTP handlers.
NewServer creates a new test server with the given handler.
Close closes the server and cleans up any resources.
MustGet performs a GET request to the given path with the given query
parameters. It panics if the request fails.
MustPost performs a POST request to the given path with the given value to
be used as a JSON body.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.