igot_http_service_helper 0.7.0 copy "igot_http_service_helper: ^0.7.0" to clipboard
igot_http_service_helper: ^0.7.0 copied to clipboard

This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform (mobile, desktop, and browser) and supports multiple implementations wi [...]

0.7.0 #

  • Enhanced POST request flexibilitypost() method now accepts dynamic body for support of various body types (Map, List, String, custom objects).
  • Updated cache key generation — now supports dynamic body types.

0.6.0 #

  • Introduced HttpAdapter abstract interface — pluggable HTTP client layer; swap out the default Dio implementation with any custom adapter via HttpService.setAdapter(adapter).
  • Added DioHttpAdapter — concrete Dio implementation of HttpAdapter; all Dio-specific logic is now encapsulated here.
  • Introduced HttpResponse<T> — new generic response model that replaces dio.Response across the public API. Access the decoded body via response.data, status via response.statusCode, and use response.isSuccess for 2xx checks.
  • Introduced HttpResponseType enum — package-agnostic replacement for dio.ResponseType; the responseType parameter on get() and post() now accepts HttpResponseType instead of dio.ResponseType.
  • All HttpService methods are now genericget<T>(), post<T>(), put<T>(), patch<T>(), delete<T>() accept an explicit type parameter for strongly-typed responses.
  • Migrated HiveService from Box to LazyBox — values are loaded on-demand, reducing memory footprint for large caches.
  • Cache compaction on cleanupdeleteAllCacheData() and clearExpiredCache() (on HiveService) now call box.compact() after deletion to reclaim disk space.
  • Updated barrel exportsigot_http_service.dart now exports HttpResponse, HttpResponseType, and HttpAdapter so consumers no longer need direct Dio imports.
  • RequestDeduplicationHelper.deduplicateRequest is now generic (deduplicateRequest<T>); removed unused utility methods (getPendingRequest, isPending, registerPendingRequest, removePendingRequest, clearAllPendingRequests, getPendingCount).
  • Breaking: HttpService.getCacheStats() and HttpService.clearExpiredCache() removed from the public HttpService API; use HiveService.getCacheStats() and HiveService.clearExpiredCache() directly.
  • Breaking: responseType parameter type changed from dio.ResponseType to HttpResponseType.
  • Breaking: All HttpService methods now return HttpResponse<T> instead of dio.Response.

0.5.0 #

  • Breaking change: Migrated the underlying HTTP client from package:http to dio (^5.9.1).
    • All HttpService methods now return dio.Response<dynamic> instead of http.Response.
    • Response bodies are accessed via response.data (auto-decoded by Dio) rather than response.body.
    • File uploads now use dio.FormData / dio.MultipartFile internally.
  • Added HttpService.configure() for one-time Dio timeout and connection-pool configuration (connectTimeout, receiveTimeout, sendTimeout, maxConnectionsPerHost).
  • Added HttpService.upload() for multipart file uploads.
  • Added HttpService.patch() for PATCH requests.
  • Added HttpService.getCacheStats() / clearExpiredCache() / deleteAllCacheData() cache-management helpers.
  • Added request deduplication via RequestDeduplicationHelper to collapse concurrent identical requests into a single network call.
  • Removed package:http dependency.

0.4.0 #

  • Flutter version updated to 3.35.7

0.3.0 #

  • Flutter version updated to 3.32.8

0.2.0 #

  • Migrated from SQL-based local storage to Hive for significantly improved read/write performance.
  • Updated caching logic to support Hive-backed storage.
  • Refactored data access layers to align with Hive box architecture.

0.1.0 #

  • Flutter version updated to 3.27.1

0.0.3 #

  • Enhanced the functionality of retrieving data.

0.0.2 #

  • Added force update feature.

0.0.1 #

  • Initial release.
  • The SDK facilitates users in making API calls, encompassing HTTP requests.
  • It empowers users to cache API responses, with the capability to set a TTL (time-to-live) for the cached data.
  • If the TTL duration hasn't elapsed, the SDK retrieves the data from the cache and returns it.
  • In the event that the TTL has expired, the SDK initiates a fresh API request, stores the updated data with the new TTL, and then returns the response.
  • If no TTL is provided by the user, the SDK automatically makes an API call and promptly returns the response.
0
likes
140
points
267
downloads

Publisher

unverified uploader

Weekly Downloads

This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform (mobile, desktop, and browser) and supports multiple implementations with DATA Base support with respect to given TTL.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

crypto, dio, flutter, hive, hive_flutter, path

More

Packages that depend on igot_http_service_helper