pratikbaid3 / flutter_client_sse

Dart package to help consume SSE API. Consumes server sent events by returning parsed model of the event, id, and the data
https://pub.dev/packages/flutter_client_sse
MIT License
40 stars 43 forks source link

Configuration for retry #26

Open eye-dee opened 1 month ago

eye-dee commented 1 month ago

Thank you for addressing https://github.com/pratikbaid3/flutter_client_sse/issues/21

I have a use-case, where infinite retry might not be an ideal option. On server 401 response I want to refresh JWT token, so it would be great if there is a chance to configure retry and maybe for my use-case an ability to put 0 retries and complete the stream with some error

pratikbaid3 commented 2 weeks ago

This is a great sugggestion. I was also thinking of providing a config object direct from the client using the package. This will allow more control over the newtwork calls.