khushpanchal / Ketch

An Android File downloader library based on WorkManager with pause and resume support.
https://medium.com/@khush.panchal123/ketch-android-file-downloader-library-7369f7b93bd1
448 stars 34 forks source link

Question: HTTP engine question #27

Closed emartynov closed 1 month ago

emartynov commented 2 months ago

I noticed that library uses retrofit. The next questions/suggestions:

  1. Many libraries that utilise okhttp allow users to pass okhttp configured for app needs. I see that this lib has configuration to modify requests but maybe you can check how coil is doing it (https://coil-kt.github.io/coil/recipes/#using-a-custom-okhttpclient).
  2. Maybe ditch Retrofit and just use okhttp for smaller transitive dependencies?
khushpanchal commented 1 month ago

@emartynov thanks for the suggestion, I have added option to pass custom okhttp client from outside while initializing the library. Please check version 2.0.2