is there a recommended way to intercept the respon...
# ktor
d
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
You can intercept response pipeline or application pipeline
Copy code
install(Routing) {
    get("/") { ... }
}
intercept(ApplicationCallPipeline.Infrastructure) {
    call.response.pipeline.intercept(ApplicationSendPipeline.After) { response ->
        // work with response object 
    }
}
d
ahh - great - thanks Sergey