itinance / itinance/react-native-fs
Android - why not use okhttp for HTTP?
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I just got into problems using Azure CDN with our RN app - Azure uses Brotli compression (`content-encoding: br`), which isn't supported on Android by default. I was able to solve the problem by custom OkHttpClientFactory (`OkHttpClientProvider.setOkHttpClientFactory(factory)`) and custom Brotli decompression network interceptor, but this solves just RN `fetch()` downloads and not `RNFS.downloadFile()`. I didn't find any easy solution how implement the Brotli support for RNFS as it doesn't use okhttp contrary to React Native so I'm not able to plug in the interceptor. Is there any reason for that? Would it make sense to rewrite the `Downloader` class to use okhttp to be in line with RN and submit a PR?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.