Does it already do this or is this a possible future feature? Thanks.
But you could pretty easily write an extension or a bit of script that
would get you most of the way there. It would create a webrequest
object, set the URL, and add headers (as possible) to the object.
You'd obviously have to test it to prevent it from throwing exceptions
if you try to set a restricted header.
1) How do I add a tab inside of the Request Builder tab page? I found
FiddlerApplication.UI.pageBuilder, which I think is the Request
Builder page, but I'm not sure how to add my custom tab to it.
2) How do I get notified when a user drags & drops a session into the
Request Builder tab page and get that session to work with it in the
event handler?
Thanks ~Chad
To add a tab, you'll want to use code like this:
// http://www.fiddler2.com/fiddler/dev/IFiddlerExtension.asp
public void OnLoad()
{
oPage = new TabPage("Timeline");
oPage.ImageIndex = (int)Fiddler.SessionIcons.Timeline;
oView = new TimelineView();
oPage.Controls.Add(oView);
oView.Dock = DockStyle.Fill;
FiddlerApplication.UI.tabsViews.TabPages.Add(oPage);
}
And then to allow dropping of sessions, you'll want to do something
like this:
void oPage_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent("Fiddler.Session[]"))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
void oPage_DragDrop(object sender, DragEventArgs e)
{
Session[] oSessions = (Session[])e.Data.GetData
("Fiddler.Session[]");
if ((oSessions == null) || (oSessions.Length < 1))
{ Debug.Assert(false, "Unexpected drop type."); return; }
}
> > > Does it already do this or is this a possible future feature? Thanks.- Hide quoted text -
>
> - Show quoted text -
The Drag & Drop code worked like a charm and I've been able to access
the session's request.
Now I just need to take care of templating the request code and
polishing the UI. Thanks for your help, Eric!
On Jan 21, 5:08 pm, EricLaw <bay...@gmail.com> wrote:
> The RequestBuilder's tabs aren't public and thus you cannot add
> directly to them. Your best bet is to add a new View tab (e.g. like
> Statistics, Inspectors, RequestBuilder, etc) that is specific to your
> extension.
>
> To add a tab, you'll want to use code like this:
>
> //http://www.fiddler2.com/fiddler/dev/IFiddlerExtension.asp
Thanks,
~Chad
But generally speaking, if someone is going to the trouble of
exporting traffic from Fiddler to a .NET program, I think that's a
good sign that they expect to be running their client without Fiddler
running.
> > > > - Show quoted text -- Hide quoted text -