Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultHTTPClientTimeout = 60 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClientWithConfig ¶ added in v0.8.0
func NewHTTPClientWithConfig(cfg ClientConfig) *http.Client
Types ¶
type ClientConfig ¶ added in v0.8.0
type ClientConfig struct {
Timeout time.Duration
Jar http.CookieJar
TransportOptions TransportOptions
}
type LoggingHTTPClient ¶
type LoggingHTTPClient struct {
// contains filtered or unexported fields
}
LoggingHTTPClient wraps an HTTP client to add centralized request/response logging.
func NewLoggingHTTPClient ¶
func NewLoggingHTTPClient(logger *slog.Logger) *LoggingHTTPClient
NewLoggingHTTPClient creates a new logging HTTP client
func NewLoggingHTTPClientWithClient ¶
func NewLoggingHTTPClientWithClient(client *http.Client, logger *slog.Logger) *LoggingHTTPClient
NewLoggingHTTPClientWithClient wraps an existing HTTP client
Click to show internal directories.
Click to hide internal directories.