Closed CorvetteCole closed 2 years ago
Hate to annoy you folks, but I'd love to get this merged @kevmoo. Would be a joy not having to use my forked library in my projects every time
I know you guys are busy but any update on this @natebosch ?
It may be a day or two before I can take a closer look.
At a high level I worry that this might not be the best place to add this functionality, but I'll have to give it some thought.
Thanks, sounds good! I thought about it as well, but this felt like a natural place since it already handles all the retry stuff already. Hate having a separate retry setup for timeouts because a network switch occurred during the request or something.
Sorry for the silence on this. I'm holding off a bit longer because we are working towards adding an abort capability to package:http
. I think a timeout would be better implemented on top of that than here.
I previously submitted a pull request for this, but... my code was utter garbage. I've gotten a lot better at Dart and I think this one is up to the standard for this library.
It does not break any past usages and only provides an extra useful option moving forward.
I have also written a few tests to verify that this works as intended.
Let me know if any other code changes are need.