ResponseInterceptor
public protocol ResponseInterceptor
a protocol intercepting a session response
-
Should be called once the request is done and output was received. Let one last chance to modify the output optionally throwing an error instead if needed
Declaration
Swift
func adaptOutput<Output>(_ output: Output, for request: Request<Output>) throws -> Output
Parameters
request
the request that was sent to the server
-
Notify of received response for
request
Declaration
Swift
func receivedResponse<Output>(_ result: Result<Output, Error>, for request: Request<Output>)
Parameters
request
the request that was sent to the server