http_interceptor 2.0.0
http_interceptor: ^2.0.0 copied to clipboard
A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.
Changelog #
2.0.0 #
- 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.7 #
- 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.6 #
- ✨ 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.
2.0.0-beta.5 #
- ✨ Added: Support for
onRequestTimeoutwhen setting uprequestTimeouton the interceptor.
2.0.0-beta.4 #
- ❗️🛠 Changed:
shouldAttemptRetryOnExceptionwill now also pass theBaseRequest. - 🚦 Tests: Updated tests.
2.0.0-beta.3 #
- 🐞 Fixed:
MultipartRequestdoes not get intercepted correctly (has missing fields). - 🐞 Fixed:
MultipartRequestignores retry policy. - 🐞 Fixed: Changing
bodycauses that theheadersalso change and ignore previous interceptions (i.e. content-type headers are overriden). - 🐞 Fixed:
copyWithwas missing fields - 🚦 Tests: Updated tests.
2.0.0-beta.2 #
- 🐞 Fixed: Changing
bodycauses that theheadersalso change and ignore previous interceptions (i.e. content-type headers are overriden). - 🚦 Tests: Updated tests.
2.0.0-beta.1 #
- ❗️🛠 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.
1.0.2 #
- 📖 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
1.0.1 #
- ✨ 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.
1.0.0 #
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.
0.4.1 #
- 🛠 Changed: Pre initialized
headersandparamsonRequestData. This was a missed change on null-safety migration.
0.4.0 #
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
0.3.3 #
- 🛠 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.
0.3.2 #
- 🛠 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.1 #
- 🐞 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.
0.3.0 #
- ✨ 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.0 #
- ✨ 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.1 #
- 🐞 Fixed: HTTP Methods have misaligned parameters. Now they are called via named parameters to avoid type mismatch exceptions when being used.
0.1.0 #
- ✨ 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.3 #
- ✨ Added: Documentation for the example.
0.0.2 #
- 🐞 Fixed: All the warnings regarding plugin publication.
0.0.1 #
- ✨ Added: Initial plugin implementation.
- ✨ Added: Example of usage for the plugin.
- ✨ Added: README.md and LICENSE files.