Need 2 Glide instances with different Okhttpclient

16 views
Skip to first unread message

Tarun A

unread,
Jun 18, 2021, 4:08:03 AM6/18/21
to Glide
Hi,

In my project, I need to add 2 different  Okhttpclient to Glide.

  • First one is to verify using authentication

  • Second one without authentication

To add custom Okhttpclient I need to use AppGlideModule,I need to override "registerComponents" and add Okhttpclient. But I can have only 1 AppGlideModule per app.

In that case, how can I add 2 different interceptors to Glide? If I am adding as LibrayGlideModule and AppGlideModule,how can I access 2 intances differently to call auth Okhttpclient and normal Okhttpclient

Reply all
Reply to author
Forward
0 new messages