Releases: bradleyhodges/api-manager
4.1.0
Release Notes: v4.1.0
- August 26, 2024
This release introduces several new utility methods and bug fixes, enhancing the overall functionality and stability of the package.
Major Features & Updates:
-
New
expectParameters
Method:- Added the
expectParameters()
method to validate and handle required parameters in requests. This method simplifies the process of ensuring necessary parameters are present and properly formatted.
- Added the
-
New
isJson
Method:- Introduced the
isJson()
method, which allows for easy validation of whether a string is valid JSON. This utility is useful for quickly checking JSON-encoded data before processing.
- Introduced the
-
Continuance Checking Methods:
- New methods for continuance checking were added to the API Response Mananger to help manage flow control and determine whether certain operations should proceed based on prior conditions.
Bug Fixes:
- Fix Incorrect
respond()
Call:- Resolved an issue where the
respond()
method was called with parameters in the incorrect order, ensuring proper response handling.
- Resolved an issue where the
Contributors:
We encourage all users to update to this latest version to take advantage of these new methods and fixes. As always, feedback and contributions are welcome!
4.0.0
This release introduces several significant updates and enhancements to the APIManager
package, particularly within the HTTP
class. These changes include new features, improved performance, and updates to the documentation.
Major Features & Updates:
-
New
HTTP
Class Implementation:- The
HTTP
class has been fully revamped with additional support for advanced features like browser impersonation, DNS caching, RFC 8305-compliant Happy Eyeballs, HTTP version fallback, and more. - Direct HTTP method utilities for
GET
,POST
,PUT
,PATCH
, andDELETE
requests have been implemented for ease of use.
- The
-
Browser Impersonation:
- Added a new method
impersonateBrowser()
which allows for sending HTTP requests with headers and behavior that mimic a web browser, including cookies, sessions, redirects, and other browser-like behavior.
- Added a new method
-
Happy Eyeballs (RFC 8305-compliant):
- The
HTTP
client now supports Happy Eyeballs, which attempts to connect to both IPv4 and IPv6 addresses simultaneously, selecting the faster option. This feature is enabled by default.
- The
-
Feature Flags:
- A new set of feature flags has been introduced, allowing users to toggle various features like DNS caching, HTTP version fallback, retry mechanisms, and more. The following flags are available:
useHappyEyeballs()
(enabled by default)useRetry()
(disabled by default)useDnsCache()
(disabled by default)useHttpVersionFallback()
(enabled by default)useMinTlsVersion()
(enabled by default)useCloudflareDns()
(disabled by default)useCookieJar()
(enabled by default)useDefaultConfig()
(enabled by default)useEvaluateRequestIntention()
(enabled by default)
- A new set of feature flags has been introduced, allowing users to toggle various features like DNS caching, HTTP version fallback, retry mechanisms, and more. The following flags are available:
-
Improved DNS Caching:
- DNS caching has been improved, allowing for faster resolution of DNS queries in high-traffic scenarios. This feature can be enabled or disabled via the
useDnsCache()
flag.
- DNS caching has been improved, allowing for faster resolution of DNS queries in high-traffic scenarios. This feature can be enabled or disabled via the
-
RFC-Compliant HTTP Client:
- The HTTP client has been updated to fully comply with RFC 8305, which improves connection reliability and reduces latency by resolving both IPv4 and IPv6 addresses efficiently.
Other Enhancements:
-
Performance Improvements:
- Various optimizations were made to reduce overhead and improve performance, particularly in high-throughput scenarios.
-
Error Handling & Logging:
- The
RuntimeException
behavior has been fixed to provide more accurate error reporting and contextual logging.
- The
-
Linter Recommendations:
- Multiple rounds of linter recommendations were applied to improve code quality and maintainability.
Documentation:
-
README Updates:
- The README has been updated to reflect the new
HTTP
class and its features. Instructions for using the new methods and feature flags are now included.
- The README has been updated to reflect the new
-
Method Overview:
- A detailed method overview for the
HTTP
class has been added, along with a new "Feature Flags" section to clearly indicate which features are enabled by default and how to customize them.
- A detailed method overview for the
Bug Fixes:
- Fix Incorrect
RuntimeException
Behavior:- Corrected improper handling of
RuntimeException
during certain HTTP request scenarios.
- Corrected improper handling of
Contributors:
We recommend updating to this version to take advantage of the new features and improvements. As always, feedback and contributions are welcome!
3.4.7
Full Changelog: https://github.com/dfes-ses/api-manager/commits/3.4.7