ContentNegotiation

class ContentNegotiation

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

See normative documents:

  • https://tools.ietf.org/html/rfc7231#section-5.3

  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation

Parameters

registrations

is a list of registered converters for ContentTypes

Constructors

Link copied to clipboard
fun ContentNegotiation(registrations: List<ContentNegotiation.ConverterRegistration>, acceptContributors: List<AcceptHeaderContributor>)

Types

Link copied to clipboard
class Configuration

Configuration type for ContentNegotiation feature

Link copied to clipboard
data class ConverterRegistration(contentType: ContentType, converter: ContentConverter)

Specifies which converter to use for a particular contentType

Link copied to clipboard

Properties

Link copied to clipboard