Hey! I was wondering how one might respond to a ca...
# ktor
l
Hey! I was wondering how one might respond to a call, outside of a route's PipelineContext. here is an small example
Copy code
val requests = MutableSharedFlow<PipelineContext<Unit, ApplicationCall>>()
...
routing {
    post("/foo") {
        requests.emit(this)
    }
}
...
requests.collect {
    it.call.respondText("bar")
}
I dont think the way I'm imagining it would be possible, simply because of how Pipeline is designed however, is there any other way to achieve a similar idea?