Companion

object Companion

Functions

Link copied to clipboard
fun parse(value: String): ContentType

Parses a string representing a Content-Type header into a ContentType instance.

Properties

Link copied to clipboard
val Any: ContentType

Represents a pattern * / * to match any content type.

Extensions

Link copied to clipboard
fun ContentType.Companion.defaultForFile(file: File): ContentType
fun ContentType.Companion.defaultForFile(file: Path): ContentType
Link copied to clipboard
fun ContentType.Companion.defaultForFileExtension(extension: String): ContentType
Link copied to clipboard
fun ContentType.Companion.defaultForFilePath(path: String): ContentType

Default ContentType for file path

Link copied to clipboard
fun ContentType.Companion.fromFileExtension(ext: String): List<ContentType>

Recommended content type by file name extension

Link copied to clipboard
fun ContentType.Companion.fromFilePath(path: String): List<ContentType>

Recommended content types by file path