handle-failed-requests-js
Implementation of Offline-js with some improvements
Why?
Because Offline-js has some bugs and inconsistencies
Features
- Promises support (axios)
- localStorage support
- Save ALL the failed requests, not just the last one
- Requests keep saved even if user try to refresh the page when offline
- Send ALL failed requests when connection is up again
- No need configuration
How
- Node / npm
npm install --save handle-failed-requests-js
; Request;
var req = ; // default method is postreq; // orreq ;
See Axios documentation for requests options