cordova-plugin-webview-proxy
cordova-plugin-webview-proxy copied to clipboard
Android proxy implementation
POST requests don't work on Android for now.
@NiklasMerz Is there anything I can do to help get this merged and available? We're using this plugin for iOS purposes, but would like to update to Android 10's https protocol, and the proxy is the best approach we have to getting it working.
We stopped pursuing this idea of an Android proxy after we found our that Android's APIs make it impossible to do a POST request. It will still work for GET requests though.
Not sure if I would want the Android part if only GET works but if you or someone else needs this I would consider merging this.
Yikes, that is... quite the limitation. I'm not sure it would be useful as GET only for our use case either.
Do you recall what the API limitation was? I wonder if there's anything we could learn from other implementations, like the Capacitor HTTP client: https://github.com/capacitor-community/http
This PR uses WebViewAssetLoader. This Android API is intended for app developers to load assets from the local file system with a proper origin.
Contrary to iOS these "path handlers" don't get information like the HTTP method used or request body. This is why we couldn't implement the proxy like on iOS.