Sometimes URLs don't provide enough flexibility 🙂
Implementation must cover this parts:
URLImage struct initializers need to be complemented with initializers that accept URLRequest object. URLImage need to contain request property and url property can be made computed. Request must go through the objects hierarchy to the ImageLoaderService.
ImageLoaderService API must be changed from using URL to using URLRequest.
File cache need to handle URLRequest objects. For GET request URL can be used as a unique key.
Optional: URLRequest builder closure to encapsulate request construction logic.
Sometimes URLs don't provide enough flexibility 🙂
Implementation must cover this parts: