InterceptorProtocol
public protocol InterceptorProtocol
Use this protocol to create interceptors that can be passed to Configuration instances. Every class which implements this protocol will intercept between request completion and callbacks.
-
This function is called when a request is failed.
Declaration
Swift
func requestFinished(responseData data: Data?, error: TNError?, request: Request, proceed: @escaping (InterceptionAction) -> Void)Parameters
responseDataThe response data of request.
errorThe TNError provided by TermiNetwork on request failure, otherwise nil value is passed.
requestThe Request object.
-
Default initializer
Declaration
Swift
init()
View on GitHub
Install in Dash
InterceptorProtocol Protocol Reference