Question regarding WebView

dprutean pruteanu at gmail.com
Wed May 8 19:44:34 UTC 2019


Hi,

I tried to get an answer on this on StackOverflow, but without success.

I am looking to intercept WebView HttpRequests and list the POST, PUT or
GET parameters for all outgoing requests. I know about Firebug, but I want
more: to get this data from the Java code.

I was thinking on solutions using:
1. Shared objects between WebView and JavaFx using:
  final JSObject jsWindowObject = (JSObject)
webView.getEngine().executeScript("window");
   jsWindowObject.setMember("cssProperty", cssProperty);
and then execute some JavaScript which would register a listener for fetch
events. I didn't find the right code.

2. Write a kind of proxy.

Do you know how this can be achived ?

Thank you,
Dragos

https://stackoverflow.com/questions/55994963/how-to-debug-javafx-webview-outgoing-requests?noredirect=1#comment98674890_55994963


More information about the openjfx-dev mailing list