Christopher Mederos
08/07/2024, 3:39 AMPOST /images/{id}/likes // desired
POST /images/997/likes
I'm looking to strip the actual id values so that I can consolidate route permutations when calculating usage analytics. It's something I could also do in a separate script or query, but thought it might be easy to do on the ktor server itself.Aleksei Tirman [JB]
08/07/2024, 8:08 AMRoute
object during the call. Here is an example:
routing {
route("/images/{id}/likes") {
install(createRouteScopedPlugin("test") {
val route = this.route
onCall {
println("Route: ${route.toString()}")
}
})
post {
call.respondText { "OK" }
}
}
}
Christopher Mederos
08/08/2024, 12:32 AM