Package io.ktor.server.plugins.contentnegotiation

Types

Link copied to clipboard
typealias AcceptHeaderContributor = (<ERROR CLASS>, acceptedContentTypes: List<ContentTypeWithQuality>) -> List<ContentTypeWithQuality>

A functional type for accepted content types contributor.

Link copied to clipboard
class ContentNegotiationConfig

A configuration for the ContentNegotiation plugin.

Link copied to clipboard
data class ContentTypeWithQuality(contentType: <ERROR CLASS>, quality: Double)

A pair of ContentType and quality usually parsed from the HttpHeaders.Accept headers.

Functions

Link copied to clipboard
fun <ERROR CLASS>.suitableCharset(defaultCharset: <ERROR CLASS> = Charsets.UTF_8): <ERROR CLASS>

Detects a suitable charset for an application call by using the Accept header or fallbacks to defaultCharset.

Properties

Link copied to clipboard
val ContentNegotiation: <ERROR CLASS><ContentNegotiationConfig>

A plugin that serves two primary purposes: