-
-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow customizing how files are downloaded, not just the headers. #53
Conversation
Nice work. I also really need this for a project. 👍 |
This would simplify my code too, as currently I have to check my tokens first for refreshing needs before I can let CachedNetworkImage do its thing. |
Hi @renefloor , this would be great! Please take al look 🙏 |
@hpoul I was working on a complete redesign of the library and the API, so that's why I didn't merge this pull request. I did use your idea in the new design though, so thanks for the pull request anyway. The new design should be much more flexible in the long run. I will publish a new alpha or beta build soon. |
Awesome to hear Rene !
Looking forward to it.
…On Sat, 24 Nov 2018 at 14:16, Rene Floor ***@***.***> wrote:
Closed #53 <https://github.com/renefloor/flutter_cache_manager/pull/53>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/renefloor/flutter_cache_manager/pull/53#event-1984995480>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMJb5bdSWUb-dsJiThWaAy2WJqmZNdTJks5uyUaagaJpZM4YGFFx>
.
|
@lifenautjoe see version |
@renefloor thanks, i have since abstracted even more, because i migrated from http library to dio - would this be something worth looking at too? see AustrianApps@7cca69d |
@hpoul could be interesting, do you already have a use case for it? |
@renefloor yep, I have migrated away from the http package in favor of dio: https://github.com/flutterchina/dio/ - mostly because the default http library does not support multi value headers and I didn't want to patch it because it was such a hotly debated topic that i doubt it would ever get merged ( dart-lang/sdk#21802 ) - and dio seems pretty good (at least API wise) and I've implemented NTLM authenticated based on dio interceptors. |
@hpoul I just implemented your suggestion, will release this soon: renefloor@ea7ff1f |
A small change to allow clients to customize download behavior, instead of using the defaul http.get() method.
My specific use case is that I have a NTLM Authentication, but can't just push in the (cookie) headers, because 1.) I want to catch the case when my session expires and I need to reauthenticate with the server. and 2.) I fetch images from different servers, which have different sessions but the same authentication.
Is this something you'd consider merging? I would also patch https://github.com/renefloor/flutter_cached_network_image to allow the same customization.