Versions in this module Expand all Collapse all v1 v1.1.0 Jan 14, 2025 Changes in this version type HTTPClient + func (c *HTTPClient) DoMultipartForm(ctx context.Context, method, url string, form map[string]interface{}, ...) error v1.0.0 Jan 12, 2025 Changes in this version + var ErrRateLimitExceeded = errors.New("rate limit exceeded") + var ErrRequestFailed = errors.New("request failed") + var ErrResponseParsing = errors.New("response parsing failed") + var ErrTimeout = errors.New("request timeout") + type HTTPClient struct + func NewHTTPClient(config HTTPClientConfig) *HTTPClient + func (c *HTTPClient) DoJSON(ctx context.Context, method, url string, reqBody interface{}, ...) error + func (c *HTTPClient) DoRequest(ctx context.Context, method, url string, body []byte, ...) ([]byte, error) + func (c *HTTPClient) GetBaseHeaders() map[string]string + func (c *HTTPClient) SetBaseHeaders(headers map[string]string) + func (h *HTTPClient) GetClient() *fasthttp.Client + type HTTPClientConfig struct + BaseHeaders map[string]string + MaxRequestTimeout time.Duration + MaxRetries int + RequestsPerSecond int + RetryWaitTime time.Duration + type RateLimiter struct + func NewRateLimiter(requestsPerSecond int) *RateLimiter + func (rl *RateLimiter) Wait(ctx context.Context) error + type RetryConfig struct + MaxRetries int + RetryWaitTime time.Duration