Search code examples
debugginghttpfiddler

HTTP Debug Recorder and Auto-responder


Can you recommend a good HTTP Debug Recorder and Autoresponder? I usually use fiddler's autoresponder, but it does not enable rules to be set by POST information, only by querystring.


Solution

  • Fiddler can absolutely return automatically generated responses based on the content of a POST body, you simply cannot do it with the UI. Click Rules > Customize Rules, and enter your script inside the OnBeforeRequest handler.

    if (oSession.uriContains("postpage.aspx") && 
      oSession.utilFindInRequest("mypostname=value"))
    {
      oSession["x-replywithfile"] = "C:\\fakeresponse.htm"; 
    }