public protocol ImageDownloadRedirectHandler
Represents and wraps a method for modifying request during an image download request redirection.
Types Conforming to
A wrapper for creating an
ImageDownloadRedirectHandlereasier. This type conforms to
ImageDownloadRedirectHandlerand wraps a redirect request modify block.
func handleHTTPRedirection( for task: SessionDataTask, response: HTTPURLResponse, newRequest: URLRequest, completionHandler: @escaping (URLRequest?) -> Void)
ImageDownloadRedirectHandler contained will be used to change the request before redirection.
This is the posibility you can modify the image download request during redirection. You can modify the
request for some customizing purpose, such as adding auth token to the header, do basic HTTP auth or
something like url mapping.
Usually, you pass an
ImageDownloadRedirectHandler as the associated value of
KingfisherOptionsInfoItem.redirectHandler and use it as the
options parameter in related methods.
If you do nothing with the input
request and return it as is, a downloading process will redirect with it.
The response received during redirection.
The request for redirection which can be modified.
A closure for being called with modified request.