DataResponseSerializerProtocol - SwiftDocOrg/Alamofire GitHub Wiki
DataResponseSerializerProtocol
The type to which all data response serializers must conform in order to serialize a response.
public protocol DataResponseSerializerProtocol
Requirements
serialize(request:response:data:error:)
Serialize the response Data into the provided type..
func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> SerializedObject
Parameters
- request:
URLRequestwhich was used to perform the request, if any. - response:
HTTPURLResponsereceived from the server, if any. - data:
Datareturned from the server, if any. - error:
Errorproduced by Alamofire or the underlyingURLSessionduring the request.
Throws
Any Error produced during serialization.
Returns
The SerializedObject.