I'd like to rewrite the URL used for resource requests coming from an Android WebView. The hook that I see for doing things like that is to override shouldInterceptRequest on the WebView's WebViewClient. However, that method only provides a String url and does not provide access to the request details (headers, etc). As a result, it's impossible to know if a call is a GET or POST / an Ajax call / etc, etc.
Is there some other Android WebView hook that provides you with the chance to rewrite a resource URL while preserving the rest of the request?
On IOS it looks like you can provide a custom implementation of NSURLCache that could perform the rewriting. Is there anything similar on Android?
(Also, I'm actually using the Crosswalk browser rather than the stock webview - which is very similar in API to the standard Android WebView. I'd be interested in solutions for either crosswalk or the Android WebView.)