Skip to content

//okhttp/okhttp3/Response/close

close

[common, nonJvm]\ [common]\ expect open override fun close()

[nonJvm]\ actual open override fun close()

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

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

[jvm]\ actual open override fun close()