feat(mobile): native clients (#21459)

* platform clients

* uppercase http method

* fix hot reload

* custom user agent

* init before app launch

* set defaults

* move to bootstrap

* unrelated change

* disable disk cache by default

* optimized decoding

* remove incremental

* android impl

* memory optimization

* lock approach is slower on ios

* conditional cronet

* clarify parameter

* enable disk cache

* set user agent

* flutter-side decode

* optimized http

* fixed locking

* refactor

* potential race conditions

* embedded cronet

* refactor, fix capacity handling

* fast path for known content length

* ios optimizations

* re-enable cache

* formatting

* bump concurrency

* clear cache button

* fix eviction race condition

* add extra cancellation check

* tighten dispose

* better error handling

* fix disposal

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Mert
2026-01-24 14:34:29 -05:00
committed by GitHub
parent 9219d559a0
commit 1803692eab
44 changed files with 1881 additions and 556 deletions

View File

@@ -34,7 +34,8 @@ type SendFile = Parameters<Response['sendFile']>;
type SendFileOptions = SendFile[1];
const cacheControlHeaders: Record<CacheControl, string | null> = {
[CacheControl.PrivateWithCache]: 'private, max-age=86400, no-transform',
[CacheControl.PrivateWithCache]:
'private, max-age=86400, no-transform, stale-while-revalidate=2592000, stale-if-error=2592000',
[CacheControl.PrivateWithoutCache]: 'private, no-cache, no-transform',
[CacheControl.None]: null, // falsy value to prevent adding Cache-Control header
};