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
responseData
The response data of request.
error
The TNError provided by TermiNetwork on request failure, otherwise nil value is passed.
request
The Request object.
-
Default initializer
Declaration
Swift
init()