Maintain Deferred Requests on Network Success
localnerve opened this issue · 0 comments
When a network request that would defer on failure does succeed, it is a good time to review and maintain the previously deferred requests for that method/endpoint/resource.
This is actually required to keep inappropriate/invalid/dangerous/etc requests from coming along later (on synchronization) and having unintended consequences.
Depending on what request succeeds, this could mean discarding deferred requests, or it could mean some more advanced reconciliation, up to and including request synthesis - This is application dependent and brings focus to the importance of batching/transaction behaviors.
In this example, it is mostly simple - just selective discarding for two resources (contact, push) on one method/endpoint (POST/_api). This will need to be revisited with the implementation of #34.