HttpIgnoreBody

预计阅读时间: 1 分钟

This feature discards the body of the response.

本特性在 io.ktor.client.features.HttpIgnoreBody 类中定义,无需任何额外构件。

Install

val client = HttpClient(HttpClientEngine) {
    install(HttpIgnoreBody)
}

Use this if you are only interested in the response headers, and you cannot use the HEAD verb. This will use less memory and will execute faster.