Versions in this module Expand all Collapse all v1 v1.1.0 Nov 6, 2026 v1.0.0 Nov 6, 2026 Changes in this version + var ErrResponseTooLarge = errors.New("http client: response limit exceeded") + func Classify(e error) error + type Client struct + HTTP *http.Client + func New(c Config) (*Client, error) + func (c *Client) Close() error + func (c *Client) Do(r *http.Request) (*http.Response, error) + func (c *Client) Download(ctx context.Context, url string, destination io.Writer) (int64, error) + func (c *Client) DownloadFile(ctx context.Context, url, path string) (err error) + func (c *Client) JSON(ctx context.Context, method, url string, input, output any) error + func (c *Client) Multipart(ctx context.Context, url string, fields map[string]string, ...) error + type Config struct + Breaker *resilience.Breaker + Clock clock.Clock + DialTimeout time.Duration + HTTPClient *http.Client + Headers http.Header + IdleTimeout time.Duration + MaxConnsPerHost int + MaxIdleConns int + MaxResponseBytes int64 + MaxRetryAfter time.Duration + Observer instrument.Hook + Propagate func(context.Context, http.Header) + RequestID func(context.Context) string + ResponseHeaderTimeout time.Duration + RetryMethods []string + RetryPolicy *retry.Policy + TLS *tls.Config + Timeout time.Duration + Transport http.RoundTripper + type MultipartFile struct + ContentType string + Field string + Filename string + Path string + type StatusError struct + RetryAfter time.Duration + Status int + func (e *StatusError) Error() string