Closed javiermrz closed 2 years ago
Hey, thank you for your proposal, it makes sense to add it and simple enough.🥳
I will try to get it soon, but contributions are always welcomed 🙌🏼
I'll do a PR no problem!
Here you go 🥳 https://github.com/CodingAleCR/http_interceptor/pull/108
The PR has been accepted and this should be up on 2.0.0-beta.5
First of all, thanks for this great library, really great work!
Is your feature request related to a problem? Please describe. I find it weird that there is a request timeout option, which will throw an error, but there is not an option to handle that error (to be able to, for example, show a toast with a generic error text if the timeout throws).
Describe the solution you'd like The solution is actually really easy and it only requires a couple lines. In
intercepted_client.dart
, in line 242 you have this:Dart lets you override a Future timeout behaviour by adding a parameter:
and then you would only have to accept this new parameter in the
build
method: