Hi there. Is there a way of receiving applicationC...
# ktor
j
Hi there. Is there a way of receiving applicationCall (or at least it's attributes) somewhere during processing, without explicitly passing them as params up the call stack? E.g. from coroutineContext? I'm talking Ktor 2.x My use case is that I'm passing a set of headers between microservices and I'd like to put them in the call attributes in some server plugin, similarly as
CallId
works, and then during request handling, whenever I'm using a ktor client to contact another service, I'd like to have a installed client plugin that retrieves these headers from coroutine context and puts them in its own requests. I believe something like that is possible in 3.0, but what about the current stable version?
a
What prevents you from implementing the above with Ktor 2.3.12?
j
We'll probably end doing so, but that has several drawbacks: we may be reinventing the wheel; we might do something wrong by not knowing the Ktor inner functionality; we will need to maintain code that's outside our day-to-day operations and domain. All the same reasons to "what prevents us from writing complete http framework from scratch, as any JS dev team does every two months". Hence the question 🙂