19

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?

1 Answer 1

39

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";
    }
2
  • 2
    I added a little to this with if (oSession.HTTPMethodIs("OPTIONS") && oSession.responseCode != 200) { oSession["ui-hide"] = "false"; } inside OnBeforeResponse so I can see the any strange option responses.
    – WORMSS
    Sep 14, 2017 at 8:46
  • 1
    @WORMSS I like that a lot. I've added something similar to my answer now, which I think is a slight improvement again. With this third version, if a OPTIONS call is slow & hanging then you will be able to see what is happening. (Rather then just empty window for 20 seconds before it finally errors.)
    – Buh Buh
    Sep 14, 2017 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.