Can you have a Ktor Client plugin install another ...
# ktor
r
Can you have a Ktor Client plugin install another plugin ? I want to have a plugin which, among other things, installs and configures another one
a
Unfortunately, no, because the plugin can be installed only within the HttpClient's configuration.
r
I suppose I would need to wrap both plugin install in a function called in the client configuration then. Too bad, I wanted to properly encapsulate the entire functionality in a plugin. A plugin has access to a request's lifecycle, maybe it should have access to the client lifecycle ?
Actually it does have
onClose
so there is some client lifecycle access, but not the one I would need