registerValidator

Registers a new validator, which will be executed for each deserialized response body.


inline fun <ContextType, ValueType> registerValidator(validator: Validator.Runner.WithContext<ContextType, ValueType>, noinline contextProvider: suspend () -> ContextType)
inline fun <ContextType, ValueType> registerValidator(validator: Validator.SuspendableRunner.WithContext<ContextType, ValueType>, noinline contextProvider: suspend () -> ContextType)

Registers a new validator, which will be executed for each deserialized response body. The contextProvider is called on each execution, then its result is feed to the validator.