callFactory

fun callFactory(callFactory: Call.Factory): ImageLoader.Builder

Set the Call.Factory used for network requests.

Calling okHttpClient automatically sets this value.

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

fun callFactory(initializer: () -> Call.Factory): ImageLoader.Builder

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

This allows lazy creation of the Call.Factory on a background thread. initializer is guaranteed to be called at most once.

Prefer using this instead of callFactory(Call.Factory).

Calling okHttpClient automatically sets this value.

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