Maybe a silly question, but the api I'm working wi...
# squarelibraries
Maybe a silly question, but the api I'm working with has a set of apis that you can call when logged in, and another when logged out. We originally had this broken out into two retrofit instances essentially ending up with LoggedInApiService and LoggedOutApiService. Is that weird or does anyone follow that same pattern?
I wouldn’t call it weird - previous projects ended up with the same situation driven by needing different OkHttp configurations and base URL for the client’s particular network services. We made sure to use the
appropriately and got on with things, injecting the appropriate Retrofit as needed.
No, grouping API endpoints by subsystem/3rdpartyintegrationsetup/baseurl/whatevercondition is a standard practice.
Thanks all @psh that's basically where I am. I need different okhttp configurations in terms of headers and there's a clean separation of headers between logged out api calls and logged in api calls.