Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient emulates any incoming http requests.
func NewHTTPClient ¶
func NewHTTPClient(t *testing.T) *HTTPClient
func (*HTTPClient) Do ¶
func (c *HTTPClient) Do(req *http.Request) *http.Response
Do allows any custom requests.
func (*HTTPClient) Get ¶
func (c *HTTPClient) Get(url string) *http.Response
Get makes GET requests and returns *http.Response.
func (*HTTPClient) GetJSON ¶
func (c *HTTPClient) GetJSON(url string, dst any)
GetJSON makes GET request and parse response to provided destination. Fails if destination provided is invalid.
Click to show internal directories.
Click to hide internal directories.