How to set OkHttpClient for glide : <p>I am using Glide to load images, the issue I'm facing is that  when i run app on slow internet connection I'm getting <code>SocketTimeOutException</code>. So to solve this issue i want to use a custom <code>OkHttpClient</code> so that I can change the timeout of HttpClient this is the code i have.  </p>

<pre><code>public class MyGlideModule  implements GlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {

    }

    @Override
    public void registerComponents(Context context, Glide glide) {
        OkHttpClient client = new OkHttpClient();
        client.setConnectTimeout(15, TimeUnit.SECONDS);
        client.setReadTimeout(15,TimeUnit.SECONDS);
        OkHttpUrlLoader.Factory factory = new OkHttpUrlLoader.Factory(client);
        glide.register(GlideUrl.class, InputStream.class, factory);
    }
}
</code></pre>

<p>but <code>OkHttpUrlLoader</code> is not there any more in Glide API. So i was wondering how can set the OkHttpClient for Glide </p>
