Versions in this module Expand all Collapse all v2 v2.0.0 Sep 21, 2026 Changes in this version + type Client struct + func NewClient(opts *Options) (*Client, error) + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) DoRequestWithRetry(ctx context.Context, req *http.Request, retryOpts *RetryOptions) (*http.Response, error) + func (c *Client) GetBaseURL() string + func (c *Client) GetHTTPClient() *http.Client + func (c *Client) InjectContext(ctx context.Context, req *http.Request) + func (c *Client) NewRequest(ctx context.Context, method, ref string, body io.Reader) (*http.Request, error) + func (c *Client) ResolveURL(ref string) (string, error) + type Options struct + BaseURL string + InsecureSkipVerify bool + Propagator Propagator + TLSCACertFile string + TLSClientCert string + TLSClientKey string + TLSServerName string + Timeout time.Duration + Transport http.RoundTripper + UserAgent string + func DefaultOptions() *Options + func (o *Options) Validate() error + type Propagator interface + Inject func(ctx context.Context, h http.Header) + func MultiPropagator(ps ...Propagator) Propagator + type PropagatorFunc func(ctx context.Context, h http.Header) + func (f PropagatorFunc) Inject(ctx context.Context, h http.Header) + type RetryOptions struct + BackoffMultiplier float64 + MaxRetries int + MaxRetryDelay time.Duration + RetryDelay time.Duration + RetryableStatusCodes []int + func DefaultRetryOptions() *RetryOptions + func (r *RetryOptions) CalculateRetryDelay(attempt int) time.Duration + func (r *RetryOptions) IsRetryableError(err error, statusCode int) bool + func (r *RetryOptions) IsRetryableErrorCtx(ctx context.Context, err error, statusCode int) bool Other modules containing this package github.com/soulteary/http-kit