Buh Buh
Buh Buh

Reputation: 7545

How to filter Fiddler traffic by request method?

Fiddler is capturing a lot of HTTP OPTIONS calls, which I have no interest in.

Is it possible to ignore these and only see GET and POST?

Upvotes: 19

Views: 6422

Answers (1)

Buh Buh
Buh Buh

Reputation: 7545

In Fiddler, click "Rules" --> "Customize Rules". This will open a script file allowing you to create custom rules.

 

If you want to hide all OPTIONS requests

find OnBeforeRequest and add in this code:

static function OnBeforeRequest(oSession: Session) {
    if (oSession.HTTPMethodIs("OPTIONS")) {
       oSession["ui-hide"] = "true";
    }

 

Or alternatively, if you want to hide them only once they have returned 200

find OnBeforeResponse and add in this code:

static function OnBeforeResponse(oSession: Session) {
    if (oSession.HTTPMethodIs("OPTIONS") && oSession.responseCode == 200) {
       oSession["ui-hide"] = "true";
    }

Upvotes: 39

Related Questions