Protocol
DataLoading
public protocol DataLoading
Fetches original image data.
Relationships
Types Conforming to DataLoading
DataLoader
Provides basic networking using
URLSession
.
Requirements
loadData(with:didReceiveData:completion:)
func loadData(with request: URLRequest,
didReceiveData: @escaping (Data, URLResponse) -> Void,
completion: @escaping (Error?) -> Void) -> Cancellable
- parameter didReceiveData: Can be called multiple times if streaming is supported.
- parameter completion: Must be called once after all (or none in case
of an error)
didReceiveData
closures have been called.