Package-level declarations

Types

Link copied to clipboard

Holds the response metadata for an image in the disk cache.

Link copied to clipboard

Determines whether to use a cached response from the disk cache or perform a new network request.

Link copied to clipboard

Exception for an unexpected, non-2xx HTTP response.

Link copied to clipboard

An asynchronous HTTP client that executes NetworkRequests and returns NetworkResponses.

Link copied to clipboard
class NetworkFetcher(url: String, options: Options, networkClient: Lazy<NetworkClient>, diskCache: Lazy<DiskCache?>, cacheStrategy: Lazy<CacheStrategy>) : Fetcher
Link copied to clipboard

Represents a list of HTTP headers.

Link copied to clipboard
class NetworkRequest(val url: String, val method: String = HTTP_METHOD_GET, val headers: NetworkHeaders = NetworkHeaders.EMPTY, val body: NetworkRequestBody? = null)

Represents an HTTP request.

Link copied to clipboard
Link copied to clipboard
class NetworkResponse(val request: NetworkRequest, val code: Int = 200, val requestMillis: Long = 0, val responseMillis: Long = 0, val headers: NetworkHeaders = NetworkHeaders.EMPTY, val body: NetworkResponseBody? = null, val delegate: Any? = null)

Represents an HTTP response.

Functions

Link copied to clipboard

The default CacheStrategy, which always returns the disk cache response.

Link copied to clipboard

Set the HTTP request body for any network operations performed by this image request.

Link copied to clipboard

Set the HTTP request headers for any network operations performed by this image request.

Link copied to clipboard

Set the HTTP request method for any network operations performed by this image request.