mirror of
https://github.com/narrrl/proton-sdk-rs.git
synced 2026-11-03 16:41:26 +01:00
A GET, or a POST that only reads, is now retried when the connection drops after the request left: before the response arrives or partway through its body. A phone does this when the OS closes a pooled connection or moves from Wi-Fi to mobile data, and until now the SDK only retried timeouts and failed connects, so every caller that walks a tree needed its own retry loop. send_retrying reads the body inside the loop and takes a Replay mode. Writes keep the old rule: a request that may have reached the server is not sent again, as a second attempt could create a duplicate. ApiHttpClient::post_query is the POST for endpoints that only read. Link details, thumbnail URLs, photo duplicates and checkAvailableHashes use it, on both the authenticated and the public-link paths. Block downloads from storage are retried as reads too.