okHttpClient

fun okHttpClient(okHttpClient: OkHttpClient): ImageLoader.Builder

Set the OkHttpClient used for network requests.

This is a convenience function for calling callFactory(Call.Factory).

NOTE: You must set OkHttpClient.cache to enable disk caching. A default Coil disk cache instance can be created using CoilUtils.createDefaultCache.

fun okHttpClient(initializer: () -> OkHttpClient): ImageLoader.Builder

Set a lazy callback to create the OkHttpClient used for network requests.

This is a convenience function for calling callFactory(() -> Call.Factory).

NOTE: You must set OkHttpClient.cache to enable disk caching. A default Coil disk cache instance can be created using CoilUtils.createDefaultCache.