DownloadResponseSerializer
public struct DownloadResponseSerializer<Value>: DownloadResponseSerializerProtocol
A generic DownloadResponseSerializerType
used to serialize a request, response, and data into a serialized object.
-
A closure used by response handlers that takes a request, response, url and error and returns a result.
Declaration
Swift
public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>
-
The type of serialized object to be created by this
DownloadResponseSerializer
.Declaration
Swift
public typealias SerializedObject = Value
-
Initializes the
ResponseSerializer
instance with the given serialize response closure.Declaration
Swift
public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>)