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