Microsoft XML SDK 2.6 - XML Reference

getResponseHeader Method

Retrieves the value of an HTTP header from the response body.

strValue = oXMLHttpRequest.getResponseHeader(bstrHeader)

Parameters

bstrHeader
String containing the case-insensitive header name.

Return Value

String. Contains the resulting header information.

Remarks

The results of this method are valid only after the send method has been successfully completed. The following line,

xmlhttp.getResponseHeader("Content-Type");

returns the string "text/xml", assuming the server set "text/xml" as the content type. The full list of header variables you can query can be accessed via the getAllResponseHeaders method.

See Also

getAllResponseHeaders Method | setRequestHeader Method

Applies To: XMLHttpRequest Object