OnHeadersAvailable Event (Windows 8)


Occurs after the client has received and processed HTTP headers in the response..

C/C++ Syntax

HRESULT OnHeadersAvailable(  
        IXMLHTTPRequest2 *pXHR,  
        DWORD dwStatus  
        const WCHAR *pwszStatus);  


The IXMLHTTPRequest2 object associated with the callback.

The status code for the request.

pwszStatus[in, string]
The status code for the request appearing in human-readable form as a null-terminated string.

Return Values

The value returned if successful.


To view an individual response header, call the GetResponseHeader method. To view all response headers, call the GetAllResponseHeaders method. To cancel the request, call the Abort method on the HTTP request that pXHR points to.


Implemented in: MSXML 6.0

Applies to

IXMLHTTPRequest2 (Windows 8)

See Also

Abort Method (IXMLHTTPRequest2, Windows 8)
GetResponseHeader Method (IXMLHTTPRequest2, Windows 8)
GetAllResponseHeaders Method (IXMLHTTPRequest2, Windows 8)