getAllResponseHeaders Method (ServerXMLHTTP/IServerXMLHTTPRequest)
Retrieves the values of all the HTTP headers.
strValue = oServerXMLHTTPRequest.getAllResponseHeaders();
Example
var xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0"); xmlServerHttp.open("GET", "http://localhost/sample.xml", false); xmlServerHttp.send(); WScript.Echo(xmlServerHttp.getAllResponseHeaders());
Output
This example returns the resulting page header information that was returned by the Web (HTTP) server hosting the specified page (sample.xml). For example, your output should include the following type header field information:
Server: Microsoft-IIS/5.1 Connection: keep-alive Date: Mon, 09 Jun 2003 18:20:29 GMT Content-Type: text/xml Accept-Ranges: bytes Last Modified: Fri, 06 Jun 2003 12:11:56 GMT ETag:"1033b5d2242cc31:97c" Content-Length: 4550