Closed javiermrz closed 2 years ago
Also, great job! It's really good that you are taking point on this, I really appreciate it and I know library users will too!
@all-contributors add javiermrz for code
@CodingAleCR
I've put up a pull request to add @javiermrz! :tada:
Function() onRequestTimeout
to the classInterceptedClient
and as parameter of the factoryInterceptedClient.build
.onRequestTimeout
is defined and the request times out,onRequestTimeout
will get executed, and afterwards aTimeoutException
will be thrown (theonTimeout
handler of aFuture
only allows callbacks that either throw an error or return a variable ofFutureOr<StreamedResponse>
in this case). Returning a random/blank response in case of timeout didn't really make sense, throwing an error seemed more correct.