RxJava结合retrofit网络请求
作者:
xx伐木累zw | 来源:发表于
2018-07-24 11:16 被阅读0次public static ApiService create(int port) {
if (apiService == null) {
Retrofit retrofit = new Retrofit.Builder().baseUrl(AppConst.BASE_URL)//+ ":" + port + "/"
.client(getOkHttpClient())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()).build();
apiService = retrofit.create(ApiService.class);
}
return apiService;
}
本文标题:RxJava结合retrofit网络请求
本文链接:https://www.haomeiwen.com/subject/pbsemftx.html
网友评论