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 2026Releases
latest 23-
3.0.023 Apr 2026Release notes
Open source →What's Changed
- v3.0.0 by @CodingAleCR in #173
New Contributors
- @shittyday made their first contribution in #151
- @iruizr7 made their first contribution in #156
- @td2thinh made their first contribution in #160
- @techouse made their first contribution in #158
Full Changelog: 2.0.0...3.0.0
Release notes
Open source →- Breaking: Rebuild from scratch. Not backwards compatible with 2.x.
- Added:
HttpInterceptorinterface (replacesInterceptorContract). Same four methods withFutureOrsupport. - Added:
InterceptedClient.build(...)andInterceptedHttp.build(...)withinterceptors,client,retryPolicy,requestTimeout,onRequestTimeout. - Added: Optional
paramsandparamsAllonget,post,put,patch,delete,head; merged into URL query. - Added:
String.toUri()extension.Uri.addQueryParams(params: ..., paramsAll: ...)extension. - Added:
ResponseJSON decoding extension (response.jsonMap,response.jsonList,response.jsonBody, etc.). - Added: Conditional export
http_interceptor_io.dartforIOClient(VM/mobile/desktop; do not use on web). - Removed:
RequestData/ResponseData. UseBaseRequest/BaseResponseonly; nocopyWithin core. - Removed: Dependencies
qs_dartandvalidators(not used in v3).
-
2.0.007 Jul 2024Release notes
Open source →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
- @wilinz made their first contribution in #132
- @jonasschaude made their first contribution in #122
- @Leptopoda made their first contribution in #144
Beta Changelog: 2.0.0-beta.7...2.0.0
Full Changelog: 1.0.2...2.0.0Release notes
Open source →- feat: Simplify configuration of delay between retries by @jonasschaude in https://github.com/CodingAleCR/http_interceptor/pull/122
- refactor!: use FutureOr to allow synchronous interceptors by @Leptopoda in https://github.com/CodingAleCR/http_interceptor/pull/144
- docs: add ayyysh04 as a contributor for ideas by @allcontributors in https://github.com/CodingAleCR/http_interceptor/pull/146
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
-
2.0.0-beta.802 Feb 2024 pre-releaseRelease notes
Open source → -
2.0.0-beta.712 Jun 2023 pre-releaseRelease notes
Open source →What's Changed
- docs: add ntimesc as a contributor for ideas by @allcontributors in #116
- updated packages by @mauryagaurav947 in #129
New Contributors
- @mauryagaurav947 made their first contribution in #129
Full Changelog: 2.0.0-beta.6...2.0.0-beta.7
Release notes
Open source →- docs: add @ntimesc as a contributor for ideas by @allcontributors in https://github.com/CodingAleCR/http_interceptor/pull/116
- updated packages by @mauryagaurav947 in https://github.com/CodingAleCR/http_interceptor/pull/129
Full Changelog: https://github.com/CodingAleCR/http_interceptor/compare/2.0.0-beta.6...2.0.0-beta.7
-
2.0.0-beta.610 Aug 2022 pre-releaseRelease notes
Open source →What's Changed
- ✨ Added:
Future<bool> shouldInterceptRequest()andFuture<bool> shouldInterceptResponse(). This enables individual interceptor checks and conditional intercepting configurations. - ✨ Added:
bodyBytestoRequest.copyWith. This adds support to set and modify the body as a stream of bytes. - ❗️🛠 Changed:
RetryPolicyto beFuture<bool>instead ofboolso that you can support different exception retrying scenarios (See #115). - 📖 Changed: example project to showcase updated Flutter 3.0, new library APIs and
MultipartRequesthandling.
Full Changelog: 2.0.0-beta.5...2.0.0-beta.6
Release notes
Open source →- ✨ Added:
Future<bool> shouldInterceptRequest()andFuture<bool> shouldInterceptResponse(). This enables individual interceptor checks and conditional intercepting configurations. - ✨ Added:
bodyBytestoRequest.copyWith. This adds support to set and modify the body as a stream of bytes. - ❗️🛠 Changed:
RetryPolicyto beFuture<bool>instead ofboolso that you can support different exception retrying scenarios (See #115). - 📖 Changed: example project to showcase updated Flutter 3.0, new library APIs and
MultipartRequesthandling.
- ✨ Added:
-
2.0.0-beta.511 Mar 2022 pre-releaseRelease notes
Open source →What's Changed
- ✨ Added: request timeout handler by @javiermrz in #108
- 📖 Changed: add javiermrz as a contributor for code by @allcontributors in #111
New Contributors
- @javiermrz made their first contribution in #108
Full Changelog: 2.0.0-beta.4...2.0.0-beta.5
Release notes
Open source →- ✨ Added: Support for
onRequestTimeoutwhen setting uprequestTimeouton the interceptor.
-
2.0.0-beta.425 Jan 2022 pre-releaseRelease notes
Open source →What's Changed
- ❗️🛠 Changed:
shouldAttemptRetryOnExceptionwill now also pass theBaseRequest. - 🚦 Tests: Updated tests.
- 🐞 Fixed:
MultipartRequestdoes not get intercepted correctly (has missing fields). - 🐞 Fixed:
MultipartRequestignores retry policy. - 🐞 Fixed: Changing
bodycauses the headers to change and ignore previous interceptions (i.e. content-type headers are overridden). - 🐞 Fixed:
copyWithwas missing fields - 🚦 Tests: Updated tests.
New Contributors
Full Changelog: 2.0.0-beta.2...2.0.0-beta.4
Release notes
Open source →- ❗️🛠 Changed:
shouldAttemptRetryOnExceptionwill now also pass theBaseRequest. - 🚦 Tests: Updated tests.
- ❗️🛠 Changed:
-
2.0.0-beta.214 Nov 2021 pre-releaseRelease notes
Open source →What's Changed
- fix: intercepting body causes headers to be reset
Full Changelog: 2.0.0-beta.1...2.0.0-beta.2
Release notes
Open source →- 🐞 Fixed: Changing
bodycauses that theheadersalso change and ignore previous interceptions (i.e. content-type headers are overriden). - 🚦 Tests: Updated tests.
-
2.0.0-beta.114 Nov 2021 pre-releaseRelease notes
Open source →What's Changed
- ❗️🛠 Changed: Renamed
Methodto useHttpMethodand refactored helper functions into extensions (StringToMethod, andMethodToString). - ❗️🛠 Changed:
InterceptorContractto useBaseRequestandBaseResponseinstead of custom models. - ❗️🛠 Removed:
RequestDataandResponseDatasince the classes are no longer used. - ✨ Added: Support for intercepting
Request,StreamedRequestandMultipartRequest. - ✨ Added: Support for intercepting
Response,StreamedResponseandMultipartRequest. - ✨ Added: Extensions for
BaseRequest,Request,StreamedRequestandMultipartRequestthat allows copying requests through acopyWithmethod. - ✨ Added: Extensions for
BaseResponse,Response,StreamedResponseandIOStreamedResponsethat allows copying responses through acopyWithmethod. - 📖 Changed: example project to showcase updated APIs.
- 🚦 Tests: Improved testing and documentation.
New Contributors
- @lukaskurz made their first contribution in #98
Full Changelog: 1.0.2...2.0.0-beta.1
Release notes
Open source →- ❗️🛠 Changed: Renamed
Methodto useHttpMethodand refactored helper functions into extensions (StringToMethod, andMethodToString). - ❗️🛠 Changed:
InterceptorContractto useBaseRequestandBaseResponseinstead of custom models. - ❗️🛠 Removed:
RequestDataandResponseDatasince the classes are no longer used. - ✨ Added: Support for intercepting
Request,StreamedRequestandMultipartRequest. - ✨ Added: Support for intercepting
Response,StreamedResponseandMultipartRequest. - ✨ Added: Extensions for
BaseRequest,Request,StreamedRequestandMultipartRequestthat allows copying requests through acopyWithmethod. - ✨ Added: Extensions for
BaseResponse,Response,StreamedResponseandIOStreamedResponsethat allows copying responses through acopyWithmethod. - 📖 Changed: example project to showcase updated APIs.
- 🚦 Tests: Improved testing and documentation.
- ❗️🛠 Changed: Renamed
-
1.0.208 Aug 2021Release notes
Open source →📖 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 @MaciejZukRelease notes
Open source →- 📖 Changed: example project to showcase
RetryPolicyusage. - 🐞 Fixed:
parameterswere missing in requests of typePOST,PUT,PATCH, andDELETE. - 🐞 Fixed:
intor other non-string parameters are not being added to request. Thanks to @meysammahfouzi - 🐞 Fixed:
bodyis not sent in delete requests despite being accepted as parameter. Thanks to @MaciejZuk
- 📖 Changed: example project to showcase
-
1.0.110 Jul 2021Release notes
Open source →- ✨ Changed:
ResponseDatanow hasrequestto allow checking on the request that triggered the response. Thanks to @II11II - 🐞 Fixed: Use
queryParametersAllwhen creatingRequestData. Thanks to @Mawi137 - 📖 Fixed:
READMEto includerequiredkeywords needed. Thanks to @meysammahfouzi - 🚦 Tests: Improved testing and documentation.
- ✨ Changed:
-
1.0.012 Jun 2021Release notes
Open source →Check out the 1.0.0 migration guide for information on how to migrate your code.
- ❗️🛠 Changed: Renamed
HttpClientWithInterceptortoInterceptedClient. - ❗️🛠 Changed: Renamed
HttpWithInterceptortoInterceptedHttp. - ❗️🛠 Removed:
badCertificateCallbackfromInterceptedClientandInterceptedHttpin order to fully support Flutter Web 🌐 . In order to use refer to the migration guide. - ✨ Added: Array parameters on
RequestDatafollowing a similar principle thanhttp'squeryParametersAll. - ✨ Changed:
ResponseDatanow hasbodyBytesto allow encoding or decoding in the format desired. - ✨ Changed: Migrated tests to use
testpackage instead offlutter_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.
- ❗️🛠 Changed: Renamed
-
0.4.110 Mar 2021Release notes
Open source →- 🛠 Changed: Pre initialized
headersandparamsonRequestData. This was a missed change on null-safety migration.
- 🛠 Changed: Pre initialized
-
0.4.009 Mar 2021Release notes
Open source →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. Sincehttpdropped 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 🌐 (
badCertificateCallbackandfindProxyfeatures are not supported on Flutter Web due to browser limitations) - 🛠 Changed: Upgraded
httpto0.13.0. - 🛠 Changed: Upgraded
effective_dartto1.3.0. - 🛠 Changed: Upgraded Dart
sdkto>=2.12.0 <3.0.0. (Yay! Sound null safety! 🎉) - 🗑 Removed:
metais removed since Dart's null safety now covers all uses inside this plugin
- ❗️✨ Added: String extension to allow
-
0.3.312 Oct 2020Release notes
Open source →- 🛠 Changed: Plugin no longer depends on the
flutter/foundation.dart, instead it usesmetaplugin 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:
badCertificateCallbackis now available to use without the experimental tag.
- 🛠 Changed: Plugin no longer depends on the
-
0.3.211 Jul 2020Release notes
Open source →- 🛠 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.
-
0.3.104 Jul 2020Release notes
Open source →- 🐞 Fixed: Retry Policy's
shouldAttemptRetryOnResponsewas synchronous which would not allow async token updates. - 🐞 Fixed: Retry Policy would only trigger once when using
HttpClientWithInterceptor. - 🐞 Fixed: Retry Policy would use the
httpResponse class, which would force plugin users to add http plugin separately. - 🧪 Experimental:
badCertificateCallbackallows you to use self-signing certificates.
- 🐞 Fixed: Retry Policy's
-
0.3.024 Apr 2020Release notes
Open source →- ✨ 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.
-
0.2.029 Jan 2020Release notes
Open source →- ✨ 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.
-
0.1.118 Sep 2019Release notes
Open source →- 🐞 Fixed: HTTP Methods have misaligned parameters. Now they are called via named parameters to avoid type mismatch exceptions when being used.
-
0.1.017 Sep 2019Release notes
Open source →- ✨ 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.
-
0.0.310 Apr 2019 -
0.0.110 Apr 2019Release notes
Open source →- ✨ Added: Initial plugin implementation.
- ✨ Added: Example of usage for the plugin.
- ✨ Added: README.md and LICENSE files.