SaveBodyPlugin

Deprecated

This plugin is no longer needed. This API is deprecated and will be removed in Ktor 4.0.0

SaveBodyPlugin saving the whole body in memory, so it can be received multiple times.

It may be useful to prevent saving body in case of big size or streaming. To do so use HttpRequestBuilder.skipSavingBody:

client.get("http://myurl.com") {
skipSavingBody()
}

The plugin is installed by default, if you need to disable it use:

val client = HttpClient {
install(SaveBodyPlugin) {
disabled = true
}
}

Report a problem