ContentNegotiation

class ContentNegotiation

This feature provides automatic content conversion according to Content-Type and Accept headers

See normative documents:

Parameters

registrations - is a list of registered converters for ContentTypes

Types

Configuration

class Configuration

Configuration type for ContentNegotiation feature

ConverterRegistration

data class ConverterRegistration

Specifies which converter to use for a particular contentType

Feature

Implementation of an ApplicationFeature for the ContentNegotiation

Constructors

<init>

ContentNegotiation(
    registrations: List<ConverterRegistration>,
    acceptContributors: List<AcceptHeaderContributor>)

This feature provides automatic content conversion according to Content-Type and Accept headers

Properties

registrations

val registrations: List<ConverterRegistration>

is a list of registered converters for ContentTypes

Companion Object Properties

key

Unique key that identifies a feature

Companion Object Functions

install

fun install(
    pipeline: ApplicationCallPipeline,
    configure: Configuration.() -> Unit
): ContentNegotiation

Feature installation script