Interface ResourceInterceptor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract ResourceResponse shouldInterceptRequest(@NonNull() ResourceRequest request) Called when the HTML converter wants to loads a resource (image, stylesheet, JavaScript etc.).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • shouldInterceptRequest

        @Nullable() abstract ResourceResponse shouldInterceptRequest(@NonNull() ResourceRequest request)

        Called when the HTML converter wants to loads a resource (image, stylesheet, JavaScript etc.).

        This method is invoked for most supported URI schemes ("http(s):", "file:" etc.) and is not limited to requests made over the network. This is not called for "javascript:", "data:" and "blob:" schemes as well as for Android assets ("file:///android_asset/") or Android resources ("file:///android_res/").

        If the source requires redirects, this method is called only for the initial base URL, not for the redirect URLs.

        This method is called on the background thread.

        Returns:

        Response for resource request with resource data, null to proceed with loading the resource as usual and skipResource to skip loading the resource.