Tuesday, August 5, 2014

Fiddler - Replay altered requests multiple times


If you want to replay a certain request in Fiddler, you can select it and press R
If you want to replay a request multiple number of times , you can select the request, press Shift + R and specify the count.
However, if you want to alter the request every time you replay it, you can do that by adding a custom rule in fiddler.

Go to Rules->Customize Rules. In the method OnBeforeRequest(oSession: Session), add the below:

 if(oSession.uriContains("yourUrl"))
 {
  oSession.utilReplaceInRequest('searchText',Guid.NewGuid());
 }

Now press Shift + R on your request and replay the altered request multiple times. Sweet!