is there a recommended way to intercept the response across all routes? i'd like to audit the response information, and have access to an injected service. (basically i want to use an audit service i've defined and log the response information).
c
cy
02/14/2018, 7:38 AM
You can intercept response pipeline or application pipeline
cy
02/14/2018, 7:38 AM
Copy code
install(Routing) {
get("/") { ... }
}
intercept(ApplicationCallPipeline.Infrastructure) {
call.response.pipeline.intercept(ApplicationSendPipeline.After) { response ->
// work with response object
}
}