ImageClient

A Ktor HTTP client for downloading images from a URL.

This object handles the network request and provides the image data as a ByteArray. It includes basic error handling for common HTTP status codes.

Note: Caching is configured but currently disabled.

Example:

val imageData = ImageClient("https://example.com/image.png")
if (imageData != null) {
// Use the image data
}

Functions

Link copied to clipboard
suspend operator fun invoke(urlString: String): ByteArray?

Asynchronously downloads an image from the given urlString.