Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-8702

Plugins should be able to override shouldInterceptRequest()

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • cordova-android
    • None

    Description

      Right now plugins can alter the result of

      shouldInterceptRequest

      via

      remapUri

      , but it would be nicer if they could actually return an

      InputStream

      .

      Propose new API to be:
      1. remapUri() to a "cdvplugin://PluginId" URI
      2. add a handleOpenForRead() for dealing with these URIs

      This way plugins can return streams not just for

      shouldInterceptRequest

      , but for all

      CordovaResourceApi

      usages.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            agrieve Andrew Grieve
            agrieve Andrew Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment