2

I wish to create a Retrofit instance via Hilt module with runtime baseUrl. How can I provide baseUrl to Hilt module? Graph example: use case -> repository -> api -> retrofit -> ....

Can you help me? Thanks.

apptrash
  • 21
  • 1
  • Should be done same as https://stackoverflow.com/questions/36498131/set-dynamic-base-url-using-retrofit-2-0-and-dagger-2. – ADM Mar 15 '22 at 05:52
  • 1
    I'm asking about hilt-way of solution. Interceptor is interesting solution, but maybe it is possible to provide dependencies to hilt modules? – apptrash Mar 15 '22 at 06:09

0 Answers0