You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request. Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
I am building a serverless app which does not know the base url until the users set it up. However, I am also using Dagger 2 to initialize the Retrofit RestAPI adapter when the application gets started before a user has an opportunity to configure the server base url. But Retrofit2 does not allow empty base url, which makes my app crash during the initialization of Dagger2. So far, I could resolve it by providing a dummy but valid http url and change it base url after the user configure the correct one. But this does not feel right. I am wondering whether there is a better solution or not?
Any suggestion will be appreciated.
The text was updated successfully, but these errors were encountered:
You can either defer initialization of the Retrofit instance until the URL is known, or you can use a placeholder like http://localhost/ and use an OkHttp interceptor to rewrite all URLs with this host to whatever value is configured.
What kind of issue is this?
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
I am building a serverless app which does not know the base url until the users set it up. However, I am also using Dagger 2 to initialize the Retrofit RestAPI adapter when the application gets started before a user has an opportunity to configure the server base url. But Retrofit2 does not allow empty base url, which makes my app crash during the initialization of Dagger2. So far, I could resolve it by providing a dummy but valid http url and change it base url after the user configure the correct one. But this does not feel right. I am wondering whether there is a better solution or not?
Any suggestion will be appreciated.
The text was updated successfully, but these errors were encountered: