SDWebImageDownloadToken

@interface SDWebImageDownloadToken : NSObject <SDWebImageOperation>

A token associated with each download. Can be used to cancel a download

  • Cancel the current download.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()
  • url

    The download’s URL.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURL *url;

    Swift

    var url: URL? { get }
  • The download’s request.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURLRequest *request;

    Swift

    var request: URLRequest? { get }
  • The download’s response.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURLResponse *response;

    Swift

    var response: URLResponse? { get }
  • The download’s metrics. This will be nil if download operation does not support metrics.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) NSURLSessionTaskMetrics *metrics;

    Swift

    var metrics: URLSessionTaskMetrics? { get }