Programming in JavaScript
|
Top Previous Next |
var httpAnalyzer=new ActiveXObject("HTTPAnalyzerStd.HTTPAnalyzerStandAlone");
httpAnalyzer.AttachProcessByName("cscript.exe");//attach to javascript process httpAnalyzer.Visible=false; httpAnalyzer.Start(); ...... httpAnalyzer.Stop(); for (var index = 0; index < httpAnalyzer.Log.Count; ++index ) { var entry = httpAnalyzer.Log.Item(index); WScript.Echo(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. //do something } |
var addon=new ActiveXObject("IEHTTPAnalyzer.HTTPAnalyzerAddOn");
addon.start(); addon.NavigateAndWait("http://www.ieinspector.com", -1);// infinite timeout addon.Stop(); for (var index = 0; index < addon.Log.Count; ++index ) { var entry = addon.Log.Item(index); WScript.Echo(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. //do something } |
var addon=new ActiveXObject("HTTPAnalyzerFF.HttpAnalyzerFirefox");
addon.start(); addon.NavigateAndWait("http://www.ieinspector.com", -1);// infinite timeout addon.Stop(); for (var index = 0; index < addon.Log.Count; ++index ) { var entry = addon.Log.Item(index); WScript.Echo(entry.URL); entry.Request;//get request entry.Response;//get response entry.Content;//get reqest content. //do something } |