feat(android): HTTP client for the sync endpoint, with ETag reuse
Fetches the opaque container and the ETag; a 304 skips both the download and the 4-second derivation, which is the whole point of keeping the tag between calls. Redirects are not followed - one to another host would send the bearer token there. Local testing goes through adb reverse tcp:8080 tcp:80, which makes the phone reach the PC as 127.0.0.1 and satisfies the endpoint's loopback exemption. That needs usesCleartextTraffic in the manifest, marked for removal before shipping.
This commit is contained in:
@@ -12,7 +12,14 @@
|
||||
<queries>
|
||||
<%queries-child-elements%>
|
||||
</queries>
|
||||
<!-- usesCleartextTraffic : TEST UNIQUEMENT. Android bloque le trafic en
|
||||
clair depuis la version 9, y compris vers 127.0.0.1 ; sans cet
|
||||
attribut l'essai local via "adb reverse" echoue avec une erreur
|
||||
reseau opaque. A RETIRER avant diffusion : l'endpoint de production
|
||||
est en HTTPS, et le jeton Bearer circule dans un en-tete a chaque
|
||||
appel. -->
|
||||
<application
|
||||
android:usesCleartextTraffic="true"
|
||||
android:persistent="%persistent%"
|
||||
android:restoreAnyVersion="%restoreAnyVersion%"
|
||||
android:label="%label%"
|
||||
|
||||
Reference in New Issue
Block a user