ContentNegotiationConfig

A ContentNegotiation configuration that is used during installation.

Report a problem

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

By default, Accept headers for registered content types will have no q value (implicit 1.0). Set this to change that behavior. This is useful to override the preferred Accept content types on a per-request basis.

Functions

Link copied to clipboard

Clear all configured ignored types including defaults.

Link copied to clipboard
inline fun <T> ignoreType()

Adds a type to the list of types that should be ignored by ContentNegotiation.

fun ignoreType(type: KClass<*>)

Adds a type to the list of types that should be ignored by ContentNegotiation.

Link copied to clipboard
open override fun <T : ContentConverter> register(contentType: ContentType, converter: T, configuration: T.() -> Unit)

Registers a contentType to a specified converter with an optional configuration script for a converter.

fun <T : ContentConverter> register(    contentTypeToSend: ContentType,     converter: T,     contentTypeMatcher: ContentTypeMatcher,     configuration: T.() -> Unit)

Registers a contentTypeToSend and contentTypeMatcher to a specified converter with an optional configuration script for a converter.

Link copied to clipboard
inline fun <T> removeIgnoredType()

Remove T from the list of types that should be ignored by ContentNegotiation.

Remove type from the list of types that should be ignored by ContentNegotiation.