OutboundResourceFetcher

Fetches one validated outbound resource without exceeding the caller's byte limit.

Implementations validate each redirect before following it and apply the caller's timeout to the complete request.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
abstract suspend fun fetch(url: String, maxBytes: Int, timeoutMillis: Long): ByteArray

Fetches url within maxBytes and timeoutMillis.