ClientHijacker
public protocol ClientHijacker
An object that can hijack outgoing requests and return either the expected response type or an error bypassing the actual http request
-
This function is handed an endpoint and should determine if it should hijack the request associated with it by returning its expected type or an error Returns: nil when doesnt bypass request.
Declaration
Swift
func hijack<T>(endpoint: Endpoint<T>) -> Result<T, Error>?