Microsoft XML 2.5 SDK


 

getResponseHeader Method

[This is preliminary documentation and subject to change.]

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

Syntax

strValue = oXMLHttpRequest.getResponseHeader(bstrHeader)

Parameters

bstrHeader

String containing the case-insensitive header name.

Returns

String containing 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 that you can query can be discovered via the getAllResponseHeaders method.

Applies To

XMLHttpRequest

See Also

getAllResponseHeaders, setRequestHeader