Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhaize1115 opened this issue Nov 2, 2020 · 0 comments
Open

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

zhaize1115 opened this issue Nov 2, 2020 · 0 comments

Comments

@zhaize1115
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant