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:​ URLRequest which was used to perform the request, if any.
  • response:​ HTTPURLResponse received from the server, if any.
  • fileURL:​ File URL to which the response data was downloaded.
  • error:​ Error produced by Alamofire or the underlying URLSession during the request.

Throws

Any Error produced during serialization.

Returns

The SerializedObject.