I need to change base url at run time. I have login button and when login button click time i am called my login api like below :
login api = http://192.168.0.61/api/authenticate
API_BASE_URL = http://192.168.0.61/api/
when i get success response from first api i get client server url for changing baseUrl.
CompanyUrlConfigEntity companyUrlConfigEntity = response.body(); like below :
String clientUrl = companyUrlConfigEntity. getBaseUrl();
clientUrl = http://192.168.0.238/api/
Run Code Online (Sandbox Code Playgroud)
In this project mainly for client or company based.So they have their own server. …