Versions in this module Expand all Collapse all v0 v0.1.0 Jan 25, 2025 Changes in this version + type MultipartBody struct + Boundary string + List []MultipartField + func NewMultipartBody() *MultipartBody + func (m *MultipartBody) SetMultipartFields(fields ...MultipartField) + type MultipartField struct + ContentID string + ContentType string + FileName string + Param string v0.0.1 Jan 25, 2025 Changes in this version + var ErrResponseBodyTooLarge = errors.New("httpclient: response body too large") + type Client struct + func NewClient(baseURL string, opts ...ClientsOption) (*Client, error) + func (c *Client) Delete(ctx context.Context, path string, body any, result any, resultError any, ...) (Response, error) + func (c *Client) Do(r *http.Request) (*http.Response, error) + func (c *Client) Get(ctx context.Context, path string, result any, resultError any, ...) (Response, error) + func (c *Client) Head(ctx context.Context, path string, resultError any, opts ...RequestOption) (Response, error) + func (c *Client) NewRequest(path string, method string, body any, opts ...RequestOption) (*http.Request, error) + func (c *Client) NewRequestWithContext(ctx context.Context, path string, method string, body any, ...) (*http.Request, error) + func (c *Client) Post(ctx context.Context, path string, body any, result any, resultError any, ...) (Response, error) + func (c *Client) PostForm(ctx context.Context, path string, data url.Values, result any, resultError any, ...) (Response, error) + func (c *Client) Put(ctx context.Context, path string, body any, result any, resultError any, ...) (Response, error) + func (c *Client) SetBaseURL(url string) *Client + type ClientsOption func(*clientConfig) + func WithDecorator(decorators []Decorator) ClientsOption + func WithSizeLimit(limitSize int) ClientsOption + func WithTransport(t http.RoundTripper) ClientsOption + func WithUserAgent(u string) ClientsOption + type Decorator func(Doer) Doer + type Doer interface + Do func(r *http.Request) (*http.Response, error) + type DoerFunc func(*http.Request) (*http.Response, error) + func (f DoerFunc) Do(r *http.Request) (*http.Response, error) + type RequestOption func(*requestConfig) + func WithHeaders(headers http.Header) RequestOption + func WithIsJson() RequestOption + func WithIsXml() RequestOption + func WithQueries(queries map[string]string) RequestOption + type Response struct + RawResponse *http.Response + Request *http.Request