Versions in this module Expand all Collapse all v0 v0.0.2 Oct 7, 2024 Changes in this version + type Mock struct + func NewMock(t *testing.T) *Mock + func (c *Mock) NewJSONMatcher(body string) httpmock.MatcherFunc + func (c *Mock) NewMockRequest(method, url string, params ...httpclient.RequestParameter) *MockRequest + func (c *Mock) Transport() *httpmock.MockTransport v0.0.1 Oct 6, 2024 Changes in this version + type Client struct + func NewClient(t *testing.T) *Client + func (c *Client) Delete(ctx context.Context, url string, parameters ...httpclient.RequestParameter) (*http.Response, error) + func (c *Client) Get(ctx context.Context, url string, parameters ...httpclient.RequestParameter) (*http.Response, error) + func (c *Client) HTTPMock() *httpmock.MockTransport + func (c *Client) Head(ctx context.Context, url string, parameters ...httpclient.RequestParameter) (*http.Response, error) + func (c *Client) NewJSONBodyMatcher(body string) httpmock.MatcherFunc + func (c *Client) NewMockRequest(method, url string, params ...httpclient.RequestParameter) *MockRequest + func (c *Client) Patch(ctx context.Context, url string, body io.Reader, ...) (*http.Response, error) + func (c *Client) Post(ctx context.Context, url string, body io.Reader, ...) (*http.Response, error) + func (c *Client) WithBaseURL(baseURL string) (*Client, error) + func (c *Client) WithDefaultHeaders(headers map[string]string) *Client + type HttpTestRequestParameter httpclient.RequestParameter + type MockRequest struct + func (r *MockRequest) Register() + func (r *MockRequest) RespondWithHeaders(respHeaders map[string]string) *MockRequest + func (r *MockRequest) RespondWithJSON(statusCode int, body string) *MockRequest + func (r *MockRequest) Responder(resp httpmock.Responder) *MockRequest + func (r *MockRequest) String() string + type MockResponse httpmock.Responder