Interface RequestModifier


  • public interface RequestModifier
    Implementation of this interface can intercept Requests and modify them before the request is sent. This can be used for instance to implement CDN switching and change the request URI, or to add query, or header parameters.

    Note that header parameters are exposed and can be changed directly on the request object. Query parameters need to be added to the Uri instance directly.

    Since:
    4.1.2
    • Method Detail

      • onRequest

        @NonNull
        Request onRequest​(@NonNull
                          Request request)
        Called with the current request object. Note: Do not return null here. If no modification should be applied, return the received request
        Parameters:
        request - The request object
        Returns:
        The potentially modified request instance. Do not return null here