I am working on an android project in which I am planning to replace Apache httpclient implementation with OKHTTP client. I would like to know how I can create a global Client that can be used for networking requests in different activities and services that will use the multi-threading of client. Should I create a singleton object of OKHTTPClient and reuse it in my code?
Also, where should I add the cookiestore to the request, In the global definition of client so that I all requests will have cookie available or while forming the request in individual activity or service?