okhttp / okhttp3 / Response / close

close

fun close(): Unit

Closes the response body. Equivalent to body().close().

It is an error to close a response that is not eligible for a body. This includes the responses returned from cacheResponse, networkResponse, and priorResponse.