Package io.ktor.server.plugins.contentnegotiation
Types
Link copied to clipboard
typealias AcceptHeaderContributor = (<ERROR CLASS>, acceptedContentTypes: List<ContentTypeWithQuality>) -> List<ContentTypeWithQuality>
Content copied to clipboard
A functional type for accepted content types contributor.
Link copied to clipboard
A configuration for the ContentNegotiation plugin.
Link copied to clipboard
data class ContentTypeWithQuality(contentType: <ERROR CLASS>, quality: Double)
Content copied to clipboard
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>
Content copied to clipboard
Detects a suitable charset for an application call by using the Accept
header or fallbacks to defaultCharset.