First, I am new to these concepts so I am really confused between the above two.
Second, take a look at the part where I've already instantiated OkHttpClient and here I have to use the setConnectedTimeout and setReadTimeout methods. So what do I do next ? Any help will be greatly appreciated.
posted 7 months ago
As it says in the Javadoc for OkHttpClient:
Use new OkHttpClient() to create a shared instance with the default settings ...
Or use new OkHttpClient.Builder() to create a shared instance with custom settings ...
The Builder allows you to build up your own version of the client.
As for what you do next, what do you want to achieve?