Austin Pederson
10/31/2022, 7:10 PMget() {...}
route from a plugin? If not, is there at least a way where I can get the parameters from a request inside a plugin?Aleksei Tirman [JB]
11/01/2022, 8:17 AMApplicationCall.parameters
object:
val plugin = createRouteScopedPlugin("plugin") {
onCall { call ->
println("ID: ${call.parameters["id"]}")
}
}
fun main() {
embeddedServer(Netty, port = 4444) {
routing {
route("/{id}") {
install(plugin)
get {}
}
}
}.start(wait = true)
}
Austin Pederson
11/01/2022, 5:04 PMAleksei Tirman [JB]
11/01/2022, 5:39 PMAustin Pederson
11/01/2022, 5:40 PM