Retrieves the values of all the HTTP headers.
strValue = oXMLHttpRequest.getAllResponseHeaders();
A string. Contains the resulting header information.
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.5.0"); xmlhttp.open("GET", "http://localhost/sample.xml", false); xmlhttp.send(); alert(xmlhttp.getAllResponseHeaders());
strValue = oXMLHttpRequest.getAllResponseHeaders
A string. Contains the resulting header information.
Dim xmlhttp As New Msxml2.xmlhttp xmlhttp.open "GET", "http://localhost/sample.xml", False xmlhttp.send MsgBox xmlhttp.getAllResponseHeaders()
HRESULT getAllResponseHeaders(BSTR *pbstrHeaders);
HRESULT hr; BSTR bstrValue = NULL; IXMLHttpRequest *pIXMLHttpRequest = NULL; try { // Create XMLHttpRequest object and initialize pIXMLHttpRequest. hr = pIXMLHttpRequest->getAllResponseHeaders(&bstrValue); if(SUCCEEDED(hr)) ::MessageBox(NULL, bstrValue, _T("All Response Headers"), MB_OK); } catch(...) { DisplayErrorToUser(); } // Release pIXMLHttpRequest when finished with it.
Each header name/value pair is separated by a combination carriage return-line feed character (vbCrLf in Microsoft® Visual Basic®).
The results of this method are valid only after the send
method has been successfully completed.
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
send Method (IXMLHTTPRequest) | getResponseHeader Method (IXMLHTTPRequest) | setRequestHeader Method (IXMLHTTPRequest)
Applies to: IXMLHTTPRequest