ConditionsHolderBuilder

interface ConditionsHolderBuilder

A builder for conditions.

Properties

Link copied to clipboard
abstract val conditions: MutableList<ApplicationCall.(OutgoingContent) -> Boolean>

Preconditions applied to every response object to check if it should be compressed.

Inheritors

Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
fun ConditionsHolderBuilder.condition(predicate: ApplicationCall.(OutgoingContent) -> Boolean)

Appends a custom condition to the encoder or the Compression configuration. A predicate returns true when a response need to be compressed. If at least one condition is not met, a response isn't compressed.

Link copied to clipboard
fun ConditionsHolderBuilder.excludeContentType(vararg mimeTypes: ContentType)

Appends a content type exclusion condition to the encoder or the Compression configuration.

Link copied to clipboard
fun ConditionsHolderBuilder.matchContentType(vararg mimeTypes: ContentType)

Appends a content type condition to the encoder or the Compression configuration.

Link copied to clipboard
fun ConditionsHolderBuilder.minimumSize(minSize: Long)

Appends a minimum size condition to the encoder or the Compression configuration.