Set dynamic base url using Retrofit 2.0 and Dagger 2

Support for this use-case was removed in Retrofit2. The recommendation is to use an OkHttp interceptor instead. HostSelectionInterceptor made by swankjesse import java.io.IOException; import okhttp3.HttpUrl; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; /** An interceptor that allows runtime changes to the URL hostname. */ public final class HostSelectionInterceptor implements Interceptor { private volatile String host; public … Read more