https://kotlinlang.org logo
#ktor
Title
# ktor
m

Marc Knaup

03/14/2020, 10:57 AM
How do I add attributes for the lifecycle of a call within a route? E.g. 1. route enter -> call.attributes.put(…) 2. all route logic 3. route exit -> call.attributes.remove(…) Currently I’m trying the following, but it exits before the route is “run”:
Copy code
intercept(ApplicationCallPipeline.Setup) {
   // add attribute
   proceed()
   // remove attribute
}
Nevermind, it does work 😮 I’ll leave it here in case someone else tries to achieve the same.
👍 1
2 Views