brabo-hi
03/12/2024, 6:32 PMbrabo-hi
03/12/2024, 6:33 PMcreateApplicationPlugin
but in that case we can only throw exception instead of returning body
val HeaderValidatorPlugin = createApplicationPlugin("HeaderValidatorPlugin") {
on(CallSetup) { call ->
if (!call.request.headers.contains("X-Customer-Header")) {
throw BadRequestException("Required header is missing")
}
Aleksei Tirman [JB]
03/12/2024, 9:10 PMApplicationCall.respond
method?