RequestValidationConfig

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun validate(validator: Validator)

Registers validator

Registers Validator using DSL

inline fun <T : Any> validate(noinline block: suspend (T) -> ValidationResult)

Registers Validator that should check instances of a T using block

fun <T : Any> validate(kClass: KClass<T>, block: suspend (T) -> ValidationResult)

Registers Validator that should check instances of a kClass using block

Link copied to clipboard

Enables validation of the request body length matches the Content-Length header. If the length doesn't match, body channel will be cancelled with IOException.