I need two global OkHttp instances in my app. I'm a dagger noob, but I inherited a project that already has the single okhttp instance, but encountering problems when I try to add a second one. What's the defacto way to have two objects of the same type in the same scope?
n
Nicholas Doglio
04/24/2020, 2:32 AM
A custom
@Qualifier
or
@Named
should solve this.
c
Colton Idle
04/24/2020, 2:38 AM
@Nicholas Doglio is any one of them typically preferred over the other?
n
Nicholas Doglio
04/24/2020, 3:25 AM
I don't think so, both are perfectly acceptable options.