I'm currently upgrading one of my projects to ktor...
# ktor
a
I'm currently upgrading one of my projects to ktor V2, but using the new plugin API there is no (non-internal) way to
finish()
a call from inside a
onCall
handler. Is that intended?
e
Hi! Could you tell me why do you need to use finish?
a
I have a rate-limiting plugin that is expected to terminate requests with a 429 when the rate limit is reached
e
Now it’s fine to use
call.respond(…)
in
onCall
handler: the call will not be passed to routing in this case.
You also can use
call.isHandled
flag to check if some other plugin wrote response before
a
Will try, thanks!