PackageTrack

pub.dev

api_request_handler

0.1.0dev-siddhartha/api_request_handler

A package for handling API requests with Dio with cache functionality and auto cancel duplicate requests.

Release timeline

5 releases since 2025
2026

Releases

  1. 0.1.025 Aug 2026
    Release notes2 sources agree
    • Fix: Hive cache is now stored in the platform cache directory instead of the app Documents directory, so .hive/.lock files no longer show up in the iOS Files app. Leftover files from the old location are cleaned up automatically on first launch after upgrading.
    • Fix: cache key generation now sorts params and includes HTTP method + client name, so equivalent params in a different order hit the cache correctly, and the same endpoint on different clients/methods no longer collides.
    • Fix: duplicate in-flight requests (same endpoint/method/params/client) now actually get cancelled when a newer identical request starts, instead of only tracking a cancel token that was never used.
    • Fix: ApiParser.parseResponse is now applied to responses and no longer throws on a list of non-map items.
    • Add: enableLogging, connectTimeout/receiveTimeout/sendTimeout, defaultCacheDuration, and maxCacheEntries options on initialize/initializeMultipleClients.
    • Add: optional retry with backoff for transient network errors via configureRetries() or per-call retries/retryDelay.
    • Add: onSendProgress/onReceiveProgress passthrough on request().
    • Add: requestTyped<T>() for typed responses via fromJson.
    • Add: requestPaginated<T>() + PaginatedResponse<T> for list endpoints, with clearCacheForEndpoint() to invalidate all cached pages of a resource at once.
    • Add: clearAllCache().
    • Add: AuthInterceptor base class for the token-attach + refresh-on-401 pattern.
    • Add: isConnectedChecker hook to fail fast when offline instead of waiting on a socket timeout.
    • Test: added unit test coverage for ApiParser and CacheService.
    Open source →
  2. 0.0.426 Aug 2025

    Nothing published for this version

  3. 0.0.326 Aug 2025

    Nothing published for this version

  4. 0.0.21 Jul 2025

    Nothing published for this version

  5. 0.0.11 Jul 2025
    Release notes2 sources agree
    • initial release.
    Open source →