Dear FiddlerCore people:
I would like to capture the Http POST stream to the server to extract the FORM and Cookie data.
I would like to only have a proxy for the current proc. This code sets the proxy for all the browsers, and
breaks the internet on
windows
header. So I have to capture the call data with Fiddler. Once I have the data from the client prepared for the server,
I want to CANCEL the call and abort the forms browser call and do
I'm only interested in the request and I will edit the request and send
of the forms browser.
My problem is that the website code spawns a new browser outside the thread I control in the form web browser.
I want to intercept the call and either edit it so it does not spawn a new client
I'm looking at the oS data structure and starting to see what it contains.
What is the best way to edit this and cancel the current request in the session?
Fiddler.URLMonInterop . SetProxyInProcess ( "127.0.0.1:8888" , "<-loopback>" );
Fiddler . FiddlerApplication . Startup ( 8888 , false , false );
//Fiddler . FiddlerApplication . Startup ( 0 , FiddlerCoreStartupFlags . Default );
Fiddler . FiddlerApplication . BeforeRequest += delegate ( Fiddler . Session oS )
{
Debug . WriteLine ( "Before request for:\t" + oS . fullUrl );
Debug . WriteLine ( String . Format ( "{0}:{1} >>{2}<<" , oS . id , oS . PathAndQuery, oS.RequestHeaders, oS.RequestMethod ,oS.RequestBody.ToString() ) );
string code;
List<Fiddler.Session> oAllSessions = new List<Fiddler . Session> ( );
oS . bBufferResponse = true;
Monitor . Enter ( oAllSessions );
oAllSessions . Add ( oS );
Monitor . Exit ( oAllSessions );
};