http_interceptor 1.0.1 http_interceptor: ^1.0.1 copied to clipboard
A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.
Changelog #
1.0.1 #
- โจ Changed:
ResponseData
now hasrequest
to allow checking on the request that triggered the response. Thanks to @II11II - ๐ Fixed: Use
queryParametersAll
when creatingRequestData
. Thanks to @Mawi137 - ๐ Fixed:
README
to includerequired
keywords 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
HttpClientWithInterceptor
toInterceptedClient
. - โ๏ธ๐ Changed: Renamed
HttpWithInterceptor
toInterceptedHttp
. - โ๏ธ๐ Removed:
badCertificateCallback
fromInterceptedClient
andInterceptedHttp
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 thanhttp
'squeryParametersAll
. - โจ Changed:
ResponseData
now hasbodyBytes
to allow encoding or decoding in the format desired. - โจ Changed: Migrated tests to use
test
package 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
headers
andparams
onRequestData
. 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. Sincehttp
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
andfindProxy
features are not supported on Flutter Web due to browser limitations) - ๐ Changed: Upgraded
http
to0.13.0
. - ๐ Changed: Upgraded
effective_dart
to1.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
0.3.3 #
- ๐ Changed: Plugin no longer depends on the
flutter/foundation.dart
, instead it usesmeta
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.
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
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.
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.