jscript - Fiddler - intercept request return different response -


in fiddler have custom rules upon getting response server, sends out new request automatically:

static function onbeforeresponse(osession: session) {     ...     if (osession.uricontains("something.aspx")) {          var requestb = "..."         fiddlerobject.utilissuerequest(requestb);     } ... } 

i want intercept requesta client, wait until have received response requestb, , return requestb's response requesta. know of way accomplish this?

you may want try function fiddlerapplication.oproxy.sendrequestandwait this:

static function onbeforeresponse(osession: session)   { ...     if (osession.uricontains("something.aspx"))    {         var osd = new system.collections.specialized.stringdictionary();         var getresquestbanswer : session = fiddlerapplication.oproxy.sendrequestandwait(requestb.orequest.headers, requestb.requestbodybytes, osd, null);         if (200 == getresquestbanswer.responsecode)         {            osession.responsebody=getresquestbanswer.responsebody;         }     }  ... } 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -