AsyncImageHeadersProvider

Deprecated

Use CDN instead. Configure via ChatClient.Builder.cdn().

Provides HTTP headers for image loading requests in a suspending, thread-safe manner.

Unlike ImageHeadersProvider, this interface is designed for async operations such as reading an auth token from encrypted storage or fetching one from a remote endpoint. Implementations are always invoked on kotlinx.coroutines.Dispatchers.IO, so blocking calls are safe.

See also

Functions

Link copied to clipboard
abstract suspend fun getImageRequestHeaders(url: String): Map<String, String>

Returns a map of headers to be used for the image loading request.