Releases: deploymenttheory/go-api-http-client
v0.1.39
v0.1.39
Token Buffer Period Adjustment
Issue: The token lifetime was shorter than the buffer period set for token refresh, causing the client to never consider the token valid and to enter a loop of continuous token refresh attempts.
Solution: Implemented a maximum consecutive token refresh attempt limit. If this limit is exceeded, an error is thrown with a message indicating that the token lifetime is likely too short compared to the configured buffer period.
Details:
Added a check in the CheckAndRefreshAuthToken method to count consecutive refresh attempts and throw an error after a specified limit.
Enhanced the error message to clearly indicate the mismatch between the access token lifetime and the buffer period configured for token refresh.
- Support for String-Based Duration in JSON Config
Issue: JSON configuration did not support string-based duration values, causing unmarshalling errors when durations were specified as strings.
Solution: Added support for parsing duration strings in JSON configuration files.
Details:
Created a custom type JSONDuration to handle durations specified as strings in JSON.
Implemented UnmarshalJSON and MarshalJSON methods for JSONDuration to parse and format duration strings.
Updated the TimeoutConfig struct to use JSONDuration instead of time.Duration.
Modified the client configuration loading logic to handle the new JSONDuration type.
Ensured all instances where durations are used (e.g., token refresh buffer period, total retry duration, custom timeout) are updated to use JSONDuration and its methods.
What's Changed
- Cookies fixed hopefully by @thejoeker12 in #192
- fix by @thejoeker12 in #193
- Bug fix: by @ShocOne in #198
Full Changelog: v0.1.38...v0.1.39
v0.1.38
v0.1.37
v0.1.37
What's Changed
- Refactor of authentication manager by @ShocOne in #184
- reorganized the ClientOptions in ther Go HTTP client code to reflect … by @ShocOne in #185
- Adjust config validation func to support struct changes by @ShocOne in #186
- Added custom cookie support for http client where users wish to set specific cookies for their usecases by @ShocOne in #187
Full Changelog: v0.1.36...v0.1.37
v0.1.36
v0.1.36
What's Changed
- Adjust concurrency logic and metrics in the concurrency package by @ShocOne in #173
- Adjust concurrency logic and metrics in the concurrency package by @ShocOne in #174
- Adjust concurrency logic and metrics in the concurrency package and a… by @ShocOne in #175
- Adjust concurrency logic and metrics in the concurrency package, and … by @ShocOne in #176
- Adjust concurrency logic and metrics in the concurrency package, and … by @ShocOne in #177
- Adjust concurrency logic and metrics in the concurrency package, and … by @ShocOne in #178
- Adjust concurrency logic and metrics in the concurrency package, and … by @ShocOne in #179
- Adjust concurrency logic and metrics in the concurrency package, and … by @ShocOne in #180
- Dev by @ShocOne in #181
- Adjust response time variability threshold in MonitorResponseTimeVari… by @ShocOne in #182
- Adjust response time variability threshold and concurrency logic in t… by @ShocOne in #183
Full Changelog: v0.1.35...v0.1.36
v0.1.35
v0.1.35
What's Changed
- Refactor concurrency package to include new metrics and adjust concur… by @ShocOne in #169
- Adjust scaling logic in ScaleDown and ScaleUp functions by @ShocOne in #170
- Refactor concurrency package to include new metrics and adjust concur… by @ShocOne in #171
- Refactored semaphore permit management by @ShocOne in #172
Full Changelog: v0.1.32...v0.1.35