lygttpod / RxHttpUtils

Rxjava+Retrofit封装,便捷使用

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何支持多个baseUrl?

manwuyuantao opened this issue · comments

对于多个baseUrl是如何支持的 ?

commented

动态实时修改BaseUrl请参考解决Retrofit多BaseUrl及运行时动态改变BaseUrl的文章介绍

    public OkHttpConfig() {
        okHttpClientBuilder = RetrofitUrlManager.getInstance().with(new OkHttpClient.Builder());// new OkHttpClient.Builder();
    }```
将上面文章中的方案集成到RxHttpUtils能解决绝大部分的baseUrl替换需求。除非项目的情况比较特殊不适用