title: How To Capture Data with FiddlerCore?
body: <p>I'm developing a program in c# that will allow me to capture the requests made by the WebBrowser1. </p>
  
  <p>My problem is that the "request data" is always empty. I don't understand where I have to put the "webBrowser1.Navigate" command.</p>
  
  <p>For now my code is as follows.</p>
  
  <pre><code>private void button3_Click(object sender, EventArgs e)
  {
      webBrowser1.ScriptErrorsSuppressed = true;
      WebProxy myProxy = new WebProxy();
      Uri newUri = new Uri("http://localhost:8888");
      myProxy.Address = newUri;
  
      Fiddler.FiddlerApplication.Startup(8888, false, false);
  
      List&lt;Fiddler.Session&gt; oAllSessions = new List&lt;Fiddler.Session&gt;();
  
      webBrowser1.Navigate("http://www.youtube.com/");
      while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
      {
          System.Windows.Forms.Application.DoEvents();
      }
  
      Fiddler.FiddlerApplication.BeforeRequest += delegate(Fiddler.Session oS)
      {
          Monitor.Enter(oAllSessions);
          oAllSessions.Add(oS);
          Monitor.Exit(oAllSessions);
      };
  
      var message = string.Join(Environment.NewLine, oAllSessions);
      MessageBox.Show(message);
  
      Fiddler.FiddlerApplication.Shutdown();
  
  }
  </code></pre>
  
  <p>thanks for the help</p>