Is there way to capture and print out all of the requests and responses from the web browser control including asynchronous requests?
Have you thought about using Fiddler? They even have an API that you might be able to use for this.
Edit
You can try using the Navigated event or LoadCompleted event for getting response information. You might be able to use the Navigating event for request information. These events might occur with async requests, but I'm not sure on that.
The Edit Strikes Back
Well I did some testing using the above events, and I'm afraid I got nothing. The events were not giving me anything that I could use. Even though they had access to webresponse and webrequest, they were always nothing/null in my testing.
I guess the sad reality is that the web browser control was not intended to be used the way you want. It's just for serving web pages/data and does not provide you the access to look into the data. I think they did it as a C.Y.A. measure to prevent someone from making a malware/spyware browser.
Your best bet is going to be coupling the web browser with fiddler (or some other 'sniffing' library).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With