Interface Hook


public interface Hook
Liblab Hook interface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterResponse(Request request, Response response)
    Is called after the response has returned
    void
    Is called before the request is made to the API
    void
    onError(Request request, Exception exception)
    Is called when an error occurs in the SDK
  • Method Details

    • beforeRequest

      void beforeRequest(Request request)
      Is called before the request is made to the API
      Parameters:
      request - the request about to be made by the SDK
    • afterResponse

      void afterResponse(Request request, Response response)
      Is called after the response has returned
      Parameters:
      request - the request that was made by the SDK
      response - the response coming back from the API the SDK has called
    • onError

      void onError(Request request, Exception exception)
      Is called when an error occurs in the SDK
      Parameters:
      request - the request that was made by the SDK
      exception - The Exception thrown