Documentation ¶
Overview ¶
Package http provides testing utilities.
Index ¶
- Variables
- func RefreshClients()
- func TestGetRequest(t testing.TB, addr string, reqT ReqType) error
- func TestPostRequestJSON(t testing.TB, addr string, reqT ReqType) error
- func TestPostRequestProto(t testing.TB, addr, ct string, reqT ReqType) error
- func TestTLSProto(t testing.TB, addr string) error
- type ReqFunc
- type ReqType
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HTTP2Client *http.Client
)
HTTP Clients for reuse, to pool connections during tests.
Functions ¶
func RefreshClients ¶
func RefreshClients()
RefreshClients creates new clients for the HTTP requests to tetst with.
func TestGetRequest ¶
TestGetRequest makes a GET request to the echo endpoint.
func TestPostRequestJSON ¶
TestPostRequestJSON makes a POST request to the echo endpoint.
func TestPostRequestProto ¶
TestPostRequestProto makes a POST request to the echo endpoint.
Types ¶
Click to show internal directories.
Click to hide internal directories.