Documentation
¶
Overview ¶
Package httpclient provides a shared HTTP client for REST API integrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// Type is the auth type: "bearer", "basic", or "none".
Type string
Token string
Username string
Password string
}
AuthConfig holds authentication configuration for HTTP requests.
type Client ¶
type Client struct {
BaseURL string
HTTPClient *http.Client
Auth AuthConfig
}
Client is a reusable HTTP client with a fixed base URL and auth configuration.
func New ¶
func New(baseURL string, auth AuthConfig, timeout time.Duration) *Client
New creates a Client with the given base URL, auth config, and timeout.
Click to show internal directories.
Click to hide internal directories.