Documentation
¶
Overview ¶
Package httpx provides a small rate-limited, retrying HTTP client shared by the source-forge and target-Forgejo API clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a rate-limited HTTP client that transparently retries on HTTP 429 and 5xx responses, honoring the Retry-After header when present.
func New ¶
New builds a Client limited to ratePerMinute requests per minute. A ratePerMinute of zero or below disables rate limiting.
func (*Client) Do ¶
Do sends req, blocking on the rate limiter first and retrying transient failures. The caller owns closing the returned body.
Click to show internal directories.
Click to hide internal directories.