Skip to content

//okhttp/okhttp3/EventListener/responseBodyEnd

responseBodyEnd

[jvm]\ open fun responseBodyEnd(call: Call, byteCount: Long)

Invoked immediately after receiving a response body and completing reading it.

Will only be invoked for requests having a response body e.g. won’t be invoked for a web socket upgrade.

If the response body is closed before the response body is exhausted, this is invoked at the time it is closed. In such calls byteCount is the number of bytes returned to the application. This may be smaller than the resource’s byte count if were read to completion.

This method is always invoked after responseBodyStart.