Package io.github.kaposke.hooks.model
Interface Hook
public interface Hook
Liblab Hook interface
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterResponse(Request request, Response response) Is called after the response has returnedvoidbeforeRequest(Request request) Is called before the request is made to the APIvoidIs called when an error occurs in the SDK
-
Method Details
-
beforeRequest
Is called before the request is made to the API- Parameters:
request- the request about to be made by the SDK
-
afterResponse
Is called after the response has returned- Parameters:
request- the request that was made by the SDKresponse- the response coming back from the API the SDK has called
-
onError
Is called when an error occurs in the SDK- Parameters:
request- the request that was made by the SDKexception- The Exception thrown
-