From 4c0ad95eb1917679d401347922cdfaf663d7bd90 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Tue, 29 Jul 2025 17:03:14 +0000 Subject: [PATCH] feat(http): add automatic rate limit handling with smartrequest - Migrated HTTP client to @push.rocks/smartrequest for robust rate limiting - Automatic retry with exponential backoff (1s, 2s, 4s) on HTTP 429 - Respects Retry-After headers from server - Improved error handling and network resilience - Updated documentation with rate limit handling examples --- changelog.md | 11 +++++++++++ package.json | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 6dc4a93..957c979 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,16 @@ # Changelog +## 2025-07-29 - 4.3.0 - feat(http) +Enhanced HTTP client with automatic rate limit handling + +- Added @push.rocks/smartrequest dependency for robust HTTP handling +- Implemented automatic retry with exponential backoff for rate-limited requests +- Built-in handling of HTTP 429 responses with intelligent waiting +- Respects Retry-After headers when provided by the server +- Maximum of 3 retry attempts with configurable backoff (1s, 2s, 4s) +- Improved error handling and network resilience +- Updated readme documentation with automatic rate limit handling examples + ## 2025-07-27 - 4.2.1 - fix(tests) Fix test compatibility with breaking changes from v4.0.0 diff --git a/package.json b/package.json index 01d54b0..31b622f 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "@apiclient.xyz/bunq", - "version": "4.2.1", + "version": "4.3.0", "private": false, "description": "A full-featured TypeScript/JavaScript client for the bunq API", "type": "module", "exports": { ".": "./dist_ts/index.js" }, - "author": "Lossless GmbH", + "author": "Task Venture Capital GmbH", "license": "MIT", "scripts": { "test": "(tstest test/ --verbose --logfile --timeout 60)", @@ -26,6 +26,7 @@ "@push.rocks/smartfile": "^11.2.5", "@push.rocks/smartpath": "^6.0.0", "@push.rocks/smartpromise": "^4.2.3", + "@push.rocks/smartrequest": "^4.2.1", "@push.rocks/smarttime": "^4.0.54" }, "files": [