![]() |
| Introduction | How to Use | Buy | Support | More ActiveX | Site Home |
OpenURL is the simplest way to use ActiveHTTP. You don't need to call Start, AddHeader, and Send.
var hr=new ActiveXObject("ActiveHTTP.Request");
var r=hr.OpenURL("http://news.eastday.com","HEAD");
if(r>0)
{
WScript.Echo(hr.GetResponseHeader());
if(r==200)
{
hr.CopyResponseContent("e:\\temp\\resp.txt");
}
}
hr.Reset();