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; eg:
var oSD = new System.Collections.Specialized.StringDictionary();
var newSession = FiddlerApplication.oProxy.SendRequestAndWait(oSession.oRequest.headers, oSession.requestBodyBytes, oSD, null);
if (200 == newSession.responseCode)
{
//....
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.