-
public interface CDNClass defining a CDN (Content Delivery Network) interface. Override to transform requests loading images/files from the custom CDN.
-
-
Method Summary
Modifier and Type Method Description CDNRequestimageRequest(String url)Transforms a request for loading an image from the CDN. CDNRequestfileRequest(String url)Transforms a request for loading a non-image file from the CDN. -
-
Method Detail
-
imageRequest
CDNRequest imageRequest(String url)
Transforms a request for loading an image from the CDN.
Implementations that perform blocking or network I/O must use
withContextto switch to the appropriate dispatcher (e.g.Dispatchers.IO).- Parameters:
url- Original CDN url for the image.
-
fileRequest
CDNRequest fileRequest(String url)
Transforms a request for loading a non-image file from the CDN.
Implementations that perform blocking or network I/O must use
withContextto switch to the appropriate dispatcher (e.g.Dispatchers.IO).- Parameters:
url- Original CDN url for the file.
-
-
-
-