Config

class Config

JsonPlugin configuration that is used during installation

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

List of content types that are handled by this plugin. It also affects Accept request header value. Please note that wildcard content types are supported but no quality specification provided.

Link copied to clipboard

List of content type matchers that are handled by this plugin. Please note that wildcard content types are supported but no quality specification provided.

Link copied to clipboard

Serializer that will be used for serializing requests and deserializing response bodies.

Functions

Link copied to clipboard
fun accept(vararg contentTypes: ContentType)

Adds accepted content types. Be aware that ContentType.Application.Json accepted by default is removed from the list if you use this function to provide accepted content types. It also affects Accept request header value.

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

Adds accepted content types. Existing content types will not be removed.

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.