ok - there isn't really anything to so that in the...
# http4k
d
ok - there isn't really anything to so that in the core, but you can easily make a filter to do it:
Copy code
class PreFlightExtractionFilter(private vararg val lensExtractors: LensExtractor<Request, *>) : Filter {
    override fun invoke(next: HttpHandler): HttpHandler = {
        val failures = Validator.Strict(it, *lensExtractors)
        if (failures.isEmpty()) next(it) else throw LensFailure(failures, target = it)
    }
}