RemoteFetcher

fun interface RemoteFetcher

Strategy for downloading remote content. Calls are blocking.

Package repositories receive a fetcher at construction so that platforms without synchronous networking, such as browsers, can supply one backed by pre-fetched content.

See also

for the platform default

Inheritors

Functions

Link copied to clipboard
abstract fun fetchBytes(url: Url): ByteArray

Downloads the content at url.

Link copied to clipboard
open fun fetchText(url: Url): String

Downloads the content at url and decodes it as UTF-8 text.