Interceptor

public protocol Interceptor

Protocol to intercept before/after network calls.

  • prepare(request:) Default implementation

    Transform URLRequest before executing

    Default Implementation

    Declaration

    Swift

    func prepare(request: URLRequest) -> URLRequest
  • willExecute(request:) Default implementation

    Invoked right before execution

    Default Implementation

    Declaration

    Swift

    func willExecute(request: Request)
  • didExecute(request:) Default implementation

    Invoked right after execution

    Default Implementation

    Declaration

    Swift

    func didExecute(request: Request)
  • process(response:) Default implementation

    Called when Request was processed

    Default Implementation

    Declaration

    Swift

    func process(response: Response)