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

Plugins should be able to override shouldInterceptRequest()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-android
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: