ResponseParser

public protocol ResponseParser

The protocol for creating a Response Parser

  • Custom Response parser need to implement this method. When done deserializing the NetworkResponse’s data, they have to set it to the NetworkResponse’s result variable.

    Any error thrown here while parsing will fail the NetworkResponse, and call the failure block with the thrown error.

    Declaration

    Swift

    func parse(response: NetworkResponse) throws