ResourceAttributes

class ResourceAttributes(resourceTypes: List<String> = emptyList(), interfaces: List<String> = emptyList(), contentFormats: List<Int> = emptyList(), val maximumSize: Long? = null, val title: String? = null, extra: List<Pair<String, String?>> = emptyList())(source)

What /.well-known/core says about a resource (RFC 6690 §3, RFC 7252 §7.2.1). The obs hint (RFC 7641 §6) is added for observable resources automatically. Immutable: the lists given are copied.

Constructors

Link copied to clipboard
constructor(resourceTypes: List<String> = emptyList(), interfaces: List<String> = emptyList(), contentFormats: List<Int> = emptyList(), maximumSize: Long? = null, title: String? = null, extra: List<Pair<String, String?>> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

ct, the Content-Formats the resource returns.

Link copied to clipboard

Further link-extension attributes, in order; a null value makes a flag.

Link copied to clipboard

if, interface descriptions.

Link copied to clipboard

sz, the maximum size estimate; RFC 6690 §3.3 says SHOULD for resources larger than one MTU.

Link copied to clipboard

rt, application-specific semantic types.

Link copied to clipboard

a human-readable title.

Functions

Link copied to clipboard
fun toLink(path: String, observable: Boolean): WebLink

The link for a resource at path.

Link copied to clipboard
open override fun toString(): String