PackageTrack
Sign in Get early access

http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

3.0.0 62K downloads/mo #1345 most downloaded on pub.dev CodingAleCR/http_interceptor

What this package is like to depend on

Last release 4 months ago

23 Apr 2026

Release timing varies

gaps range from 4 weeks to 1.8 years

Nearly every release is documented

notes for 16 of 16 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

23 releases · first in 2019

1 release in the last 12 months

see the full history below

Release timeline

23 releases · Apr 2019 to Apr 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 23
  1. 3.0.0 23 Apr 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.0.0...3.0.0

    Open source →
    Release notes
    • Breaking: Rebuild from scratch. Not backwards compatible with 2.x.
    • Added: HttpInterceptor interface (replaces InterceptorContract). Same four methods with FutureOr support.
    • Added: InterceptedClient.build(...) and InterceptedHttp.build(...) with interceptors, client, retryPolicy, requestTimeout, onRequestTimeout.
    • Added: Optional params and paramsAll on get, post, put, patch, delete, head; merged into URL query.
    • Added: String.toUri() extension. Uri.addQueryParams(params: ..., paramsAll: ...) extension.
    • Added: Response JSON decoding extension (response.jsonMap, response.jsonList, response.jsonBody, etc.).
    • Added: Conditional export http_interceptor_io.dart for IOClient (VM/mobile/desktop; do not use on web).
    • Removed: RequestData/ResponseData. Use BaseRequest/BaseResponse only; no copyWith in core.
    • Removed: Dependencies qs_dart and validators (not used in v3).
    Open source →
  2. 2.0.0 07 Jul 2024
    Release notes

    What's Changed

    • Fix type 'Response' is not a subtype of type 'StreamedResponse' in type cast by @wilinz in #132
    • feat: Simplify configuration of delay between retries by @jonasschaude in #122
    • refactor!: use FutureOr to allow synchronous interceptors by @Leptopoda in #144
    • docs: add ayyysh04 as a contributor for ideas by @allcontributors in #146
    • fix: ci actions, docs and issues with requestTimeout configs by @CodingAleCR in #147

    New Contributors

    Beta Changelog: 2.0.0-beta.7...2.0.0
    Full Changelog: 1.0.2...2.0.0

    Open source →
    Release notes

    Beta Changelog: https://github.com/CodingAleCR/http_interceptor/compare/2.0.0-beta.8...2.0.0

    Full Changelog: https://github.com/CodingAleCR/http_interceptor/compare/1.0.2...2.0.0

    Open source →
  3. 2.0.0-beta.8 02 Feb 2024 pre-release
    Release notes

    What's Changed

    • Fix type 'Response' is not a subtype of type 'StreamedResponse' in type cast by @wilinz in #132

    New Contributors

    Full Changelog: 2.0.0-beta.7...2.0.0-beta.8

    Open source →
  4. 2.0.0-beta.7 12 Jun 2023 pre-release
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.0.0-beta.6...2.0.0-beta.7

    Open source →
    Release notes Open source →
  5. 2.0.0-beta.6 10 Aug 2022 pre-release
    Release notes

    What's Changed

    • ✨  Added: Future<bool> shouldInterceptRequest() and Future<bool> shouldInterceptResponse(). This enables individual interceptor checks and conditional intercepting configurations.
    • ✨  Added: bodyBytes to Request.copyWith. This adds support to set and modify the body as a stream of bytes.
    • ❗️🛠  Changed: RetryPolicy to be Future<bool> instead of bool so that you can support different exception retrying scenarios (See #115).
    • 📖  Changed: example project to showcase updated Flutter 3.0, new library APIs and MultipartRequest handling.

    Full Changelog: 2.0.0-beta.5...2.0.0-beta.6

    Open source →
    Release notes
    • ✨  Added: Future<bool> shouldInterceptRequest() and Future<bool> shouldInterceptResponse(). This enables individual interceptor checks and conditional intercepting configurations.
    • ✨  Added: bodyBytes to Request.copyWith. This adds support to set and modify the body as a stream of bytes.
    • ❗️🛠  Changed: RetryPolicy to be Future<bool> instead of bool so that you can support different exception retrying scenarios (See #115).
    • 📖  Changed: example project to showcase updated Flutter 3.0, new library APIs and MultipartRequest handling.
    Open source →
  6. 2.0.0-beta.5 11 Mar 2022 pre-release
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.0.0-beta.4...2.0.0-beta.5

    Open source →
    Release notes
    • ✨  Added: Support for onRequestTimeout when setting up requestTimeout on the interceptor.
    Open source →
  7. 2.0.0-beta.4 25 Jan 2022 pre-release
    Release notes

    What's Changed

    • ❗️🛠 Changed: shouldAttemptRetryOnException will now also pass the BaseRequest.
    • 🚦 Tests: Updated tests.
    • 🐞 Fixed: MultipartRequest does not get intercepted correctly (has missing fields).
    • 🐞 Fixed: MultipartRequest ignores retry policy.
    • 🐞 Fixed: Changing body causes the headers to change and ignore previous interceptions (i.e. content-type headers are overridden).
    • 🐞 Fixed: copyWith was missing fields
    • 🚦 Tests: Updated tests.

    New Contributors

    Full Changelog: 2.0.0-beta.2...2.0.0-beta.4

    Open source →
    Release notes
    • ❗️🛠  Changed: shouldAttemptRetryOnException will now also pass the BaseRequest.
    • 🚦  Tests: Updated tests.
    Open source →
  8. 2.0.0-beta.2 14 Nov 2021 pre-release
    Release notes

    What's Changed

    • fix: intercepting body causes headers to be reset

    Full Changelog: 2.0.0-beta.1...2.0.0-beta.2

    Open source →
    Release notes
    • 🐞  Fixed: Changing body causes that the headers also change and ignore previous interceptions (i.e. content-type headers are overriden).
    • 🚦  Tests: Updated tests.
    Open source →
  9. 2.0.0-beta.1 14 Nov 2021 pre-release
    Release notes

    What's Changed

    • ❗️🛠  Changed: Renamed Method to use HttpMethod and refactored helper functions into extensions (StringToMethod, and MethodToString).
    • ❗️🛠  Changed: InterceptorContract to use BaseRequest and BaseResponse instead of custom models.
    • ❗️🛠  Removed: RequestData and ResponseData since the classes are no longer used.
    • ✨  Added: Support for intercepting Request,StreamedRequest and MultipartRequest.
    • ✨  Added: Support for intercepting Response,StreamedResponse and MultipartRequest.
    • ✨  Added: Extensions for BaseRequest, Request,StreamedRequest and MultipartRequest that allows copying requests through a copyWith method.
    • ✨  Added: Extensions for BaseResponse, Response,StreamedResponse and IOStreamedResponse that allows copying responses through a copyWith method.
    • 📖  Changed: example project to showcase updated APIs.
    • 🚦  Tests: Improved testing and documentation.

    New Contributors

    Full Changelog: 1.0.2...2.0.0-beta.1

    Open source →
    Release notes
    • ❗️🛠  Changed: Renamed Method to use HttpMethod and refactored helper functions into extensions (StringToMethod, and MethodToString).
    • ❗️🛠  Changed: InterceptorContract to use BaseRequest and BaseResponse instead of custom models.
    • ❗️🛠  Removed: RequestData and ResponseData since the classes are no longer used.
    • ✨  Added: Support for intercepting Request,StreamedRequest and MultipartRequest.
    • ✨  Added: Support for intercepting Response,StreamedResponse and MultipartRequest.
    • ✨  Added: Extensions for BaseRequest, Request,StreamedRequest and MultipartRequest that allows copying requests through a copyWith method.
    • ✨  Added: Extensions for BaseResponse, Response,StreamedResponse and IOStreamedResponse that allows copying responses through a copyWith method.
    • 📖  Changed: example project to showcase updated APIs.
    • 🚦  Tests: Improved testing and documentation.
    Open source →
  10. 1.0.2 08 Aug 2021
    Release notes

    📖 Changed: example project to showcase RetryPolicy usage.
    🐞 Fixed: parameters were missing in requests of type POST, PUT, PATCH, and DELETE.
    🐞 Fixed: int or other non-string parameters are not being added to request. Thanks to @ Contributor meysammahfouzi
    🐞 Fixed: body is not sent in delete requests despite being accepted as parameter. Thanks to @MaciejZuk

    Open source →
    Release notes
    • 📖  Changed: example project to showcase RetryPolicy usage.
    • 🐞  Fixed: parameters were missing in requests of type POST, PUT, PATCH, and DELETE.
    • 🐞  Fixed: int or other non-string parameters are not being added to request. Thanks to @meysammahfouzi
    • 🐞  Fixed: body is not sent in delete requests despite being accepted as parameter. Thanks to @MaciejZuk
    Open source →
  11. 1.0.1 10 Jul 2021
    Release notes
    • ✨  Changed: ResponseData now has request to allow checking on the request that triggered the response. Thanks to @II11II
    • 🐞  Fixed: Use queryParametersAll when creating RequestData. Thanks to @Mawi137
    • 📖  Fixed: README to include required keywords needed. Thanks to @meysammahfouzi
    • 🚦  Tests: Improved testing and documentation.
    Open source →
  12. 1.0.0 12 Jun 2021
    Release notes

    Check out the 1.0.0 migration guide for information on how to migrate your code.

    • ❗️🛠  Changed: Renamed HttpClientWithInterceptor to InterceptedClient.
    • ❗️🛠  Changed: Renamed HttpWithInterceptor to InterceptedHttp.
    • ❗️🛠  Removed: badCertificateCallback from InterceptedClient and InterceptedHttp in order to fully support Flutter Web 🌐 . In order to use refer to the migration guide.
    • ✨  Added: Array parameters on RequestData following a similar principle than http's queryParametersAll .
    • ✨  Changed: ResponseData now has bodyBytes to allow encoding or decoding in the format desired.
    • ✨  Changed: Migrated tests to use test package instead of flutter_test.
    • ✨  Changed: More tests and coverage, this is a work in progress.
    • 🗑  Removed: Package no longer depends on Flutter, which means that it can be used with standalone Dart projects.
    Open source →
  13. 0.4.1 10 Mar 2021
    Release notes
    • 🛠  Changed: Pre initialized headers and params on RequestData. This was a missed change on null-safety migration.
    Open source →
  14. 0.4.0 09 Mar 2021
    Release notes

    Check out our 0.4.0 migration guide for information on how to migrate your code.

    • ❗️✨  Added: String extension to allow toUri() usage when importing the library. Since http dropped support for string url usage and since Dart does not yet support function overloading, we had to implement an alternative through extensions.
    • ✨  Added: Flutter web support 🌐   (badCertificateCallback and findProxy features are not supported on Flutter Web due to browser limitations)
    • 🛠  Changed: Upgraded http to 0.13.0.
    • 🛠  Changed: Upgraded effective_dart to 1.3.0.
    • 🛠  Changed: Upgraded Dart sdk to >=2.12.0 <3.0.0. (Yay! Sound null safety! 🎉)
    • 🗑  Removed: meta is removed since Dart's null safety now covers all uses inside this plugin
    Open source →
  15. 0.3.3 12 Oct 2020
    Release notes
    • 🛠  Changed: Plugin no longer depends on the flutter/foundation.dart, instead it uses meta plugin which allows for usage on non flutter environments.
    • 🛠  Changed: README now features a contribution and a roadmap sections for improving visibility on the project's future.
    • 🛠  Changed: badCertificateCallback is now available to use without the experimental tag.
    Open source →
  16. 0.3.2 11 Jul 2020
    Release notes
    • 🛠  Changed: Example now showcases exception handling.
    • 🛠  Changed: README now showcases exception handling.
    • 🐞  Fixed: Interceptor no longer using custom exceptions, instead it rethrows in the case that the retry policy is not set or if it has reached max attempts.
    Open source →
  17. 0.3.1 04 Jul 2020
    Release notes
    • 🐞  Fixed: Retry Policy's shouldAttemptRetryOnResponse was synchronous which would not allow async token updates.
    • 🐞  Fixed: Retry Policy would only trigger once when using HttpClientWithInterceptor.
    • 🐞  Fixed: Retry Policy would use the http Response class, which would force plugin users to add http plugin separately.
    • 🧪  Experimental: badCertificateCallback allows you to use self-signing certificates.
    Open source →
  18. 0.3.0 24 Apr 2020
    Release notes
    • ✨  Added: RetryPolicy. It allows to attempt retries on a request when an exception occurs or when a condition from the response is met.
    • 🐞  Fixed: URI type urls not concatenating parameters.
    Open source →
  19. 0.2.0 29 Jan 2020
    Release notes
    • ✨  Added: Unit testing for a few of the files.
    • 🛠  Changed: Android and iOS projects both in the plugin and the example now use Kotlin/Swift.
    • 🛠  Changed: Android projects both in the plugin and the example now use AndroidX namespaces.
    • 🐞  Fixed: Last ' ' character was not removed from parametized URLs.
    • 🐞  Fixed: Duplicate GET parameters when using get.
    Open source →
  20. 0.1.1 18 Sep 2019
    Release notes
    • 🐞  Fixed: HTTP Methods have misaligned parameters. Now they are called via named parameters to avoid type mismatch exceptions when being used.
    Open source →
  21. 0.1.0 17 Sep 2019
    Release notes
    • ✨  Added: Query Parameters to GET requests, it allows you to set proper parameters without having to add them to the URL beforehand.
    • 🛠  Changed: Documentation for the example to include the new Query Parameters usage.
    Open source →
  22. 0.0.3 10 Apr 2019
    Release notes
    • ✨  Added: Documentation for the example.
    Open source →
  23. 0.0.1 10 Apr 2019
    Release notes
    • ✨  Added: Initial plugin implementation.
    • ✨  Added: Example of usage for the plugin.
    • ✨  Added: README.md and LICENSE files.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive