Configuration
class Configuration
Configuration type for ContentNegotiation feature
Constructors
Configuration() Configuration type for ContentNegotiation feature |
Functions
fun accept(contributor: AcceptHeaderContributor): Unit Register a custom accepted content types contributor. A contributor function takes ApplicationCall
and a list of content types accepted according to HttpHeaders.Accept header or provided by the previous
contributor if exists. Result of this contributor should be a list of accepted content types
with quality. A contributor could either keep or replace input list of accepted content types depending
on use-case. For example a contributor taking |
|
fun <T : ContentConverter> register( Registers a contentType to a specified converter with an optional configuration script for converter |
Extension Functions
fun Configuration.gson( Register GSON to ContentNegotiation feature |
|
fun Configuration.jackson( Register Jackson converter into ContentNegotiation feature |
|
fun Configuration.serialization( Register kotlinx.serialization converter into ContentNegotiation feature |