Documentation
¶
Overview ¶
Package httpclient provides HTTP client functionality for API operations
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout is the default timeout for HTTP requests DefaultTimeout = 10 * time.Second // MaxResponseSize is the maximum allowed response size (100MB) MaxResponseSize = 100 * 1024 * 1024 // UserAgent is the user agent string for HTTP requests UserAgent = "toolhive-registry-server/1.0" )
Variables ¶
This section is empty.
Functions ¶
func NewHTTPError ¶
NewHTTPError creates a new HTTP error
Types ¶
type Client ¶
type Client interface {
// Get performs an HTTP GET request and returns the response body
Get(ctx context.Context, url string) ([]byte, error)
}
Client is an interface for HTTP operations
func NewDefaultClient ¶
NewDefaultClient creates a new default HTTP client with the specified timeout If timeout is 0, uses DefaultTimeout
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
DefaultClient is the default HTTP client implementation
Click to show internal directories.
Click to hide internal directories.