author:wangyimiao

desc:去除默认HOST
master
yimiao 3 years ago
parent ba79414412
commit 832e6b70f8

@ -1,7 +1,6 @@
package com.common.commonlib.net package com.common.commonlib.net
import com.common.commonlib.net.interceptor.BaseUrlInterceptor import com.common.commonlib.net.interceptor.BaseUrlInterceptor
import com.common.commonlib.net.interceptor.HttpCommonInterceptor
import com.common.commonlib.utils.BaseUtils import com.common.commonlib.utils.BaseUtils
import okhttp3.Interceptor import okhttp3.Interceptor
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
@ -61,14 +60,14 @@ object RequestManager {
.client(builder.build()) .client(builder.build())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.baseUrl("https://www.wanandroid.com") .baseUrl("https://www")
.build() .build()
} else { } else {
mRetrofit = Retrofit.Builder() mRetrofit = Retrofit.Builder()
.client(builder.build()) .client(builder.build())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create())
.baseUrl("https://www.wanandroid.com") .baseUrl("https://www")
.build() .build()
} }
} }

Loading…
Cancel
Save