ResourceRequestOptions

class ResourceRequestOptions(val accept: List<String>? = null, val range: ByteRangeRequest? = null)

Options object used with ResourceProvider.fetch and ResourceProvider.fetchMetadata.

Constructors

Link copied to clipboard
fun ResourceRequestOptions(accept: List<String>? = null, range: ByteRangeRequest? = null)

Properties

Link copied to clipboard
val accept: List<String>? = null

If set, it defines which media-types the client is able to understand depending on the context where the request is done. If the ResourceProvider has multiple resources available for the same path, it should return a resource compatible with any of the media-type values.

Link copied to clipboard
val range: ByteRangeRequest? = null

If set, it defines the byte range to fetch from the resource body. If the resource cannot be partially fetched using byte ranges, fetch throws an Exception.