DataResponseSerializer
public struct DataResponseSerializer<Value> : DataResponseSerializerProtocol
A generic DataResponseSerializerType used to serialize a request, response, and data into a serialized object.
-
The type of serialized object to be created by this
DataResponseSerializer.Declaration
Swift
public typealias SerializedObject = Value -
A closure used by response handlers that takes a request, response, data and error and returns a result.
Declaration
Swift
public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value> -
Initializes the
ResponseSerializerinstance with the given serialize response closure.Declaration
Swift
public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value>)Parameters
serializeResponseThe closure used to serialize the response.
Return Value
The new generic response serializer instance.
DataResponseSerializer Structure Reference