DataResponse
public struct DataResponse<Value>
Used to store all data associated with a serialized response of a data or upload 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 data returned by the server.
Declaration
Swift
public let data: Data?
-
The result of response serialization.
Declaration
Swift
public let result: Result<Value>
-
Creates a
DataResponse
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 server 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?