Dumping Data From Fiddler in HTTP Archive Format

3 posts, 0 answers
  1. Rushikesh
    Rushikesh avatar
    1 posts
    Member since:
    Jan 2018

    Posted 24 Jan Link to this post

    Hey,

    I am trying to dump data to a file automatically. I have added the following in " OnBeforeResponse" of fiddler script.

    if (oSession.url.Contains("?_ctrl-state=")) {
              var directory: String = "D:\\me\\usefull\\data";
              var path: String = System.IO.Path.Combine(directory, Guid.NewGuid() + ".json");
              oSession.utilDecodeRequest();
              oSession.utilDecodeResponse();
              oSession.SaveSession(path , false);
          }

     But when I do File>ExportSession>SelectedSession i can see list of file formats in which the same session data can be stored. Is there any way that i can save the file in HTTP Archive format using the script.

     

    Thanks 

    Alle

  2. Alexander
    Admin
    Alexander avatar
    336 posts

    Posted 29 Jan Link to this post

    Hello,

    Yes, you can export in all formats that are listed in the export session window. You should use FiddlerApplication.DoExport instead of Session.SaveSession. The sExportFormat argument should match the label shown in the export session window.

    Regards,
    Alexander
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Alexander
    Admin
    Alexander avatar
    336 posts

    Posted 29 Jan Link to this post

    Hello again,

    I forgot to mention how you set the output file path. You can do this by adding an entry to the dictOptions argument with key "Filename" and value the path to where it should be written.

    Regards,
    Alexander
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top