DownloadResponse
public struct DownloadResponse<Value>
Used to store all data associated with a serialized response of a download request.
-
The URL request sent to the server.
Declaration
Swift
public let request: URLRequest?
-
The server’s response to the URL request.
Declaration
Swift
public let response: HTTPURLResponse?
-
The temporary destination URL of the data returned from the server.
Declaration
Swift
public let temporaryURL: URL?
-
The final destination URL of the data returned from the server if it was moved.
Declaration
Swift
public let destinationURL: URL?
-
The resume data generated if the request was cancelled.
Declaration
Swift
public let resumeData: Data?
-
The result of response serialization.
Declaration
Swift
public let result: Result<Value>
-
The timeline of the complete lifecycle of the request.
Declaration
Swift
public let timeline: Timeline
-
Creates a
DownloadResponse
instance with the specified parameters derived from response serialization.Declaration
-
The textual representation used when written to an output stream, which includes whether the result was a success or failure.
Declaration
Swift
public var description: String
-
The debug textual representation used when written to an output stream, which includes the URL request, the URL response, the temporary and destination URLs, the resume data, the response serialization result and the timeline.
Declaration
Swift
public var debugDescription: String
-
The task metrics containing the request / response statistics.
Declaration
Swift
public var metrics: URLSessionTaskMetrics?