Version

interface Version

Represents content version

An example of version is EntityTagVersion or LastModifiedVersion

Functions

appendHeadersTo

abstract fun appendHeadersTo(builder: HeadersBuilder): Unit

Appends relevant headers to the builder

check

abstract fun check(
    requestHeaders: Headers
): VersionCheckResult

Checks requestHeaders against this version and returns VersionCheckResult

Inheritors

EntityTagVersion

data class EntityTagVersion : Version

This version checks etag value and pass it through conditions supplied by the remote client. Depending on conditions it produces return value of enum type VersionCheckResult

LastModifiedVersion

data class LastModifiedVersion : Version

This version passes the given lastModified date through the client provided http conditional headers If-Modified-Since and If-Unmodified-Since.