Save specific file locally

3 posts, 1 answers
  1. yttooloolez
    yttooloolez avatar
    5 posts
    Member since:
    May 2019

    Posted 14 May Link to this post

    Hello, im new here I just wanted to save a specific file with FiddlerScript but it seems not working what did I do wrong ?

    public static void OnBeforeResponse(Session oSession)
    {
        if (m_Hide304s && oSession.responseCode == 304)
        {
            oSession["ui-hide"] = "true";
        }
        if (oSession.url.Contains("/my.task/")) {
           var directory: String = "c:\\sources\\";
           var path: String = System.IO.Path.Combine(directory + ".json");
              oSession.utilDecodeResponse();
           oSession.SaveResponseBody(path);
        }
    }

     

  2. yttooloolez
    yttooloolez avatar
    5 posts
    Member since:
    May 2019

    Posted 14 May in reply to yttooloolez Link to this post

    My bad, response goes in document/fiddler2/ folder

    How can I change that and rename the file ?

     

    Thanks.

  3. Answer
    Simeon
    Admin
    Simeon avatar
    227 posts

    Posted 21 May Link to this post

    Hello,

    I have tried your example and the file was saved in C:\sources\.json Maybe you tried with the "c:\\Users\\%USERNAME%\\Documents\Fiddler2\" folder.

    'How can I change that and rename the file ?' It should work with any filepath you are authorized to use and you should be able to use any valid filename.

    Regards,
    Simeon
    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