0

What I'm trying to do is to intercept the response data and modify the response from a particular URL.

For example, when loadUrl("http://foo.bar") is called to a WebView, let's say that it will load "page.html", "data.json", "someimage.png", and so on. In this case, how can I modify the contents of data.json when the resource is fetched, and pass the modified file to the WebView?

I think shouldInterceptRequest might be the answer, but I can't figure out how to get a WebResourceResponse from a WebResourceRequest.

I'm sorry if my English is awkward ;(

CRMN
  • 1

0 Answers0