public struct ResponseSerializer<Value, Error: ErrorType>: ResponseSerializerType
ResponseSerializerType used to serialize a request, response, and data into a serialized object.
A closure used by response handlers that takes a request, response, data and error and returns a result.
public var serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result<Value, Error>
The type of error to be created by this
ResponseSerializerif serialization fails.
public typealias ErrorObject = Error
The type of serialized object to be created by this
public typealias SerializedObject = Value
ResponseSerializerinstance with the given serialize response closure.
public init(serializeResponse: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Result<Value, Error>)
The closure used to serialize the response.
The new generic response serializer instance.