installOrReplace

Installs the specified plugin and optionally configures it using the configure block. If the plugin is already installed, the configuration block will replace the existing configuration class.

val client = HttpClient {
installOrReplace(ContentNegotiation) {
// configuration block
json()
}
}

Learn more from Plugins.

Report a problem