Is it possible to get all HTTP requests of a browser?
For example: we have opened the browser, navigated to google.com, searched for a string, clicked on any link and I got some error. Now I want to track all HTTP requests from opening browser. We have been using 'fiddler' to do so. But we want to use C# code to track all开发者_JS百科 HTTP requests as well as HTTP responses. And we want to use the failed HTTP responses in our program.
Any information on this will be very helpful.
You could use SharpPcap to implement your own 'sniffer', or use a HttpListener
to create a proxy that forwards web requests.
AFAICS, there is no way of implementing this which does not replicate what you are already doing with fiddler (albeit that you could implement a passive sniffer rather than a proxy).
精彩评论