re-frame-http-fx-alpha
re-frame-http-fx-alpha copied to clipboard
Handling nesting timeouts
When I'm making HTTP requests, I have several levels of timeouts I'd like to be able to compose:
- Granular connection and response timeouts (unfortunately not exposed in Fetch)
- HTTP Request level timeouts - timeout for a single HTTP request
- re-frame HTTP request deadline - cumulative time spent attempting to send this logical request, perhaps spread over multiple attempts, and including any exponential backoff time.
I would like to be able to specify an overall deadline for a request after which is it aborted (say 30s), set a per request timeout of 20s, and specify a retry policy. At the moment, it looks like I'd need to build in my own retry logic to handle the overall deadline. Would that be a useful general feature to have?