package
Version:
v0.4.2
Opens a new window with list of versions in this module.
Published: May 3, 2025
License: GPL-3.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
internal/http_client
Responsibility
- Provides a wrapper around the standard
net/http client.
- Handles HTTP requests and responses with custom configuration.
- Implements retry logic and error handling.
Scope
- HTTP client creation and configuration.
- Request execution and response handling.
- Retry logic for failed requests.
Test Suite Overview
- Tests should cover request execution, response handling, and retry logic.
Decisions & Potential Gotchas
- Uses the standard
net/http client.
- Retry logic is configurable.
- Error handling should be robust.
Documentation
¶
type DefaultHTTPClient struct{}
DefaultHTTPClient is the default implementation of HTTPClient.
Post makes an HTTP POST request.
HTTPClient is an interface for making HTTP requests.
NewHTTPClient creates a new HTTPClient.
type MockHTTPClient struct {
mock.Mock
}
MockHTTPClient is a mock implementation of HTTPClient.
Post makes an HTTP POST request.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.