In the spa on an angular, all requests are implemented through $ http. If the packet is lost (bad internet) status -1 is returned to the request. Is it possible to somehow make $ http repeat the request until a response is received from the server or a certain number of times?
2 answers
Offline-first : on the one hand, you can improve caching and use timeouts , on the other hand, solutions for lazy synchronization and so on
|
Made a wrapper that sends requests until it receives a positive response or until the number of requests exceeds N.
|