ResourceResponse

Describes a response from ResourceProvider.fetch. It contains metadata about the resource and methods for reading the resource body.

Functions

Link copied to clipboard
abstract fun abort()

Signals that the resource fetching should be aborted and eventually closes the underlying I/O stream. This method MAY be called by any thread.

Link copied to clipboard
abstract fun asBytes(): ByteArray

Fetches the resource body as an array of bytes.

Link copied to clipboard
abstract fun asInputStream(): InputStream

Fetches an InputStream that can be used to read the resource body.

Properties

Link copied to clipboard

Contains metadata about the resource.