FileURLPassthroughResponseSerializer

public struct FileURLPassthroughResponseSerializer : DownloadResponseSerializerProtocol

Response serializer, that returns file URL upon successful download. Is used for DownloadAPIRequest.

  • Error returned when received fileURL is nil

    Declaration

    Swift

    public struct MissingURLError : Error
  • Extracts file URL from received response

    Throws

    serialization errors.

    Declaration

    Swift

    public func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> URL

    Parameters

    request

    URLRequest that was sent to receive response.

    response

    HTTP response object that was received.

    fileURL

    File URL where downloaded file was placed after successful download.

    error

    Error, received by URL loading system or Alamofire.

    Return Value

    File URL