i need to send http request in onBeforeResponse method.
i am trying to add this method in CustomRules.js
static function httpGet(theUrl){
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
"XMLHttpRequest" is not defined
Fiddler doesn't have a browser object model, so XMLHttpRequest
isn't defined. Fortunately, it offers many different ways to send HTTP requests; e.g.:
var oSD = new System.Collections.Specialized.StringDictionary();
var newSession = FiddlerApplication.oProxy.SendRequestAndWait(oSession.oRequest.headers, oSession.requestBodyBytes, oSD, null);
if (200 == newSession.responseCode)
{
//....
}