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
Aleksei Tirman [JB]
04/23/2024, 1:12 PM
Unfortunately, no, because the plugin can be installed only within the HttpClient's configuration.
r
ribesg
04/23/2024, 1:15 PM
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 ?
ribesg
04/23/2024, 1:16 PM
Actually it does have
onClose
so there is some client lifecycle access, but not the one I would need