Open PiemonJ opened 2 years ago
Our general policy for this has been to use an OkHttp interceptor to rewrite the Request object to target the desired host. You can use a global host at the Retrofit layer or even just use a dummy domain like example.com
to ensure the interceptor is required to rewrite the URL.
In the future, we may consider a factory for base URLs which is invoked each time a request is created.