MVPArms icon indicating copy to clipboard operation
MVPArms copied to clipboard

如果想切换多个retrofit实例,怎么改?

Open zhaize1115 opened this issue 5 years ago • 0 comments

RepositoryManager中mRetrofit没办法根据业务不同做切换,现在我有多套业务接口,header和body的参数和格式以及签名方式都不同,甚至连gson解析的实体都不同。之前的做法是根据接口类型创建多个retrofit单例,每个单例add不同的intercepter和adapter,可是现在只能使用一个retrofit实例,虽然能在configuration中动态添加intercepter,可如果这两个intercepter是互斥的,就顾此失彼了。

zhaize1115 avatar Nov 02 '20 10:11 zhaize1115