ContentType

Represents a value for a Content-Type header.

Constructors

Link copied to clipboard
constructor(contentType: String, contentSubtype: String, parameters: List<HeaderValueParam> = emptyList())

Types

Link copied to clipboard

Provides a list of standard subtypes of an application content type.

Link copied to clipboard
object Audio

Provides a list of standard subtypes of an audio content type.

Link copied to clipboard
object Companion
Link copied to clipboard
object Font

Provides a list of standard subtypes of a font content type.

Link copied to clipboard
object Image

Provides a list of standard subtypes of an image content type.

Link copied to clipboard
object Message

Provides a list of standard subtypes of a message content type.

Link copied to clipboard
object MultiPart

Provides a list of standard subtypes of a multipart content type.

Link copied to clipboard
object Text

Provides a list of standard subtypes of a text content type.

Link copied to clipboard
object Video

Provides a list of standard subtypes of a video content type.

Properties

Link copied to clipboard

represents a subtype part of the media type.

Link copied to clipboard

represents a type part of the media type.

Link copied to clipboard

Functions

Link copied to clipboard

Extracts a Charset value from the given Content-Type, Content-Disposition or similar header value.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Recommended file name extensions for this content type

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun match(pattern: ContentType): Boolean
fun match(pattern: String): Boolean

Checks if this type matches a pattern type taking into account placeholder symbols * and parameters.

Link copied to clipboard
fun parameter(name: String): String?

The first value for the parameter with name comparing case-insensitively or null if no such parameters found

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

Creates a copy of this type with the added charset parameter with charset value.

Link copied to clipboard

Creates a copy of this type with the added charset parameter with charset value if ContentType is not ignored

Link copied to clipboard

Creates a copy of this type without any parameters

Link copied to clipboard

Creates a copy of this type with the added parameter with the name and value.