SPUDownloadData

Objective-C

@interface SPUDownloadData : NSObject <NSSecureCoding>

Swift

class SPUDownloadData : NSObject, NSSecureCoding

A class for containing downloaded data along with some information about it.

  • The raw data that was downloaded.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSData *_Nonnull data;

    Swift

    var data: Data { get }
  • URL

    The URL that was fetched from.

    This may be different from the URL in the request if there were redirects involved.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSURL *_Nonnull URL;

    Swift

    var url: URL { get }
  • The IANA charset encoding name if available. Eg: “utf-8”

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *textEncodingName;

    Swift

    var textEncodingName: String? { get }
  • The MIME type if available. Eg: “text/plain”

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *MIMEType;

    Swift

    var mimeType: String? { get }