Rank: Newbie Groups: Member
Joined: 4/14/2020 Posts: 4
|
I am working with some black-box web components within the WebView component that use XHR to communicate with their home server. With the Developer Tools open I can review the data being passed between.
Is there a way I can do this programmatically with the WebView, without having to put a proxy in between and snoop on the traffic using Man-In-Middle interception?
If not, could you expose this as a pair of events on the WebView component to expose the information and data (NetworkTrafficSent, NetworkTrafficReceived) so it can be accessed? This would be a really useful extension to the object to expose data already available in the Development tool.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, The closest you can do is to implement your own custom resource handler: https://www.essentialobjects.com/doc/webbrowser/advanced/resource_handler.aspxThis way you can capture every request and handle it yourself. Note that this is only the request. Your handler will be responsible to fetch the response and pass it back to the browser engine. This would allow you to inspect traffic both ways. Note that you should use this feature with caution. The network layer of the browser engine is highly optimized. So rerouting the network traffic through your code can have a significant performance impact. Thanks!
|