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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top