This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Repository navigation
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
HTTPClass Implementation:- The
HTTPclass 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, andDELETErequests 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
HTTPclient 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
RuntimeExceptionbehavior 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
HTTPclass 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
HTTPclass 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
RuntimeExceptionBehavior:- Corrected improper handling of
RuntimeExceptionduring 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!