ResponseCache

Captures the content of a Response for caching.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Indicates whether this cached response has expired.

Functions

Link copied to clipboard
fun getBody(): ResponseBody

Returns a new ResponseBody backed by the cached bytes.

Link copied to clipboard
fun ifModifiedHeaders(): Headers

Builds conditional request headers asserting that the resource has been modified since it was cached

Link copied to clipboard
fun ifUnmodifiedHeaders(): Headers

Builds conditional request headers asserting that the resource has not been modified since it was cached.