Question

I'm trying to intercept the http calls which are generated during page loading. In other words, I would to realize a network traffic analyzer like the Firefox Firebug Net Panel.

Is it possible in Javafx?

Thanks.

Was it helpful?

Solution

Call URL.setURLStreamHandlerFactory

Read A new era for Java Protocol Handlers to understand the background for this.

Answer assumes you are using the standard WebView implementation or the java.net.URL class for networking and not some custom method.

A code sample for this would take me some time. The recommended approach is to follow the instructions provided in my answer. I'll put together a code sample in a few days if I have time and the question asker or nobody else has provided a sample.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top