Documentation
¶
Overview ¶
Package httpx builds HTTP clients with authentication, retries, a User-Agent and optional debug tracing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// TokenSource authenticates requests (optional).
TokenSource TokenSource
UserAgent string
// Debug receives a request/response trace when non-nil.
Debug io.Writer
// MaxRetries for idempotent requests on 429/5xx (default 2).
MaxRetries int
Base http.RoundTripper
}
type TokenSource ¶
type TokenSource interface {
oauth2.TokenSource
// Invalidate discards the current token and reports whether the next
// Token call can return a different one (false for static tokens).
Invalidate() bool
}
TokenSource is an oauth2.TokenSource that can be told its token was rejected.
Click to show internal directories.
Click to hide internal directories.