SaveBodyPlugin

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
}
}