Versions in this module Expand all Collapse all v0 v0.0.8 Apr 17, 2026 Changes in this version + func DelayWithJitter(baseDelay, jitter time.Duration) time.Duration + func Sleep(baseDelay, jitter time.Duration) + type Client struct + func New(opts ...Option) *Client + func (c *Client) Do(req *http.Request) (*Response, error) + func (c *Client) Get(ctx context.Context, url string) (*Response, error) + func (c *Client) GetJSON(ctx context.Context, url string, dest any) (*Response, error) + func (c *Client) GetWithHeaders(ctx context.Context, url string, headers map[string]string) (*Response, error) + func (c *Client) Head(ctx context.Context, url string) (*Response, error) + func (c *Client) HeadWithHeaders(ctx context.Context, url string, headers map[string]string) (*Response, error) + func (c *Client) IsAlive(ctx context.Context, url string) bool + func (c *Client) Post(ctx context.Context, url string, body any) (*Response, error) + func (c *Client) PostForm(ctx context.Context, requestURL string, values url.Values) (*Response, error) + func (c *Client) PostFormWithHeaders(ctx context.Context, requestURL string, values url.Values, ...) (*Response, error) + func (c *Client) PostJSON(ctx context.Context, url string, body any, dest any) (*Response, error) + func (c *Client) PostWithHeaders(ctx context.Context, url string, body any, headers map[string]string) (*Response, error) + func (c *Client) Request(ctx context.Context, method, requestURL string, body io.Reader, ...) (*Response, error) + type Option func(*Options) + func WithBlockCrossDomainRedirects() Option + func WithDefaultHeaders(headers map[string]string) Option + func WithMaxRedirects(n int) Option + func WithRedirectTracking() Option + func WithTLSVerify(verify bool) Option + func WithTimeout(d time.Duration) Option + type Options struct + BlockCrossDomainRedirects bool + DefaultHeaders map[string]string + MaxRedirects int + Timeout time.Duration + TrackRedirects bool + VerifyTLS bool + type RedirectHop struct + StatusCode int + URL string + type Response struct + Body []byte + Headers http.Header + RedirectChain []RedirectHop + StatusCode int