Versions in this module Expand all Collapse all v0 v0.1.0 Jul 10, 2025 Changes in this version + const ModuleName + const ServiceName + func NewHTTPClientModule() modular.Module + type ClientService interface + Client func() *http.Client + RequestModifier func() RequestModifierFunc + WithTimeout func(timeoutSeconds int) *http.Client + type Config struct + DisableCompression bool + DisableKeepAlives bool + IdleConnTimeout int + MaxIdleConns int + MaxIdleConnsPerHost int + RequestTimeout int + TLSTimeout int + Verbose bool + VerboseOptions *VerboseOptions + func (c *Config) GetTimeout(seconds int) time.Duration + func (c *Config) Validate() error + type FileLogger struct + func NewFileLogger(baseDir string, logger modular.Logger) (*FileLogger, error) + func (f *FileLogger) Close() error + func (f *FileLogger) LogRequest(id string, data []byte) error + func (f *FileLogger) LogResponse(id string, data []byte) error + func (f *FileLogger) LogTransactionToFile(id string, reqData, respData []byte, duration time.Duration, url string) error + type HTTPClientModule struct + func (m *HTTPClientModule) Client() *http.Client + func (m *HTTPClientModule) Dependencies() []string + func (m *HTTPClientModule) Init(app modular.Application) error + func (m *HTTPClientModule) Name() string + func (m *HTTPClientModule) ProvidesServices() []modular.ServiceProvider + func (m *HTTPClientModule) RegisterConfig(app modular.Application) error + func (m *HTTPClientModule) RequestModifier() RequestModifierFunc + func (m *HTTPClientModule) RequiresServices() []modular.ServiceDependency + func (m *HTTPClientModule) SetRequestModifier(modifier RequestModifierFunc) + func (m *HTTPClientModule) Start(context.Context) error + func (m *HTTPClientModule) Stop(context.Context) error + func (m *HTTPClientModule) WithTimeout(timeoutSeconds int) *http.Client + type RequestModifierFunc func(*http.Request) *http.Request + type VerboseOptions struct + LogBody bool + LogFilePath string + LogHeaders bool + LogToFile bool + MaxBodyLogSize int