Companion

object Companion

Functions

Link copied to clipboard
fun from(response: Response): ResponseCache?

Creates a ResponseCache from response if it is eligible for caching.

fun from(response: Response, bodyByteString: ByteString, contentType: MediaType?): ResponseCache?

Creates a ResponseCache from response using a pre-buffered body if the response is eligible for caching.

Link copied to clipboard
fun fromPut(response: Response, responseBody: ByteString, responseContentType: MediaType?, requestBody: ByteString, requestContentType: MediaType?): ResponseCache?

Creates a ResponseCache from the response to a PUT request if the server sent an ETag. Caches the response body if there is one.