Skip to content

Latest commit

 

History

History
113 lines (81 loc) · 3.45 KB

nf-msxml6-ixmlhttprequest2-getresponseheader.md

File metadata and controls

113 lines (81 loc) · 3.45 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msxml6.IXMLHTTPRequest2.GetResponseHeader
IXMLHTTPRequest2::GetResponseHeader (msxml6.h)
Retrieves the value of an HTTP header from the response headers.
GetResponseHeader
GetResponseHeader method [XMLHttpRequest2]
GetResponseHeader method [XMLHttpRequest2]
IXMLHTTPRequest2 interface
IXMLHTTPRequest2 interface [XMLHttpRequest2]
GetResponseHeader method
IXMLHTTPRequest2.GetResponseHeader
IXMLHTTPRequest2::GetResponseHeader
ixhr2.ixmlhttprequest2_getresponseheader
msxml6/IXMLHTTPRequest2::GetResponseHeader
ixhr2\ixmlhttprequest2_getresponseheader.htm
ixhr2
5D68DAAA-D359-4FDF-8250-14A8D732FFFA
12/05/2018
GetResponseHeader, GetResponseHeader method [XMLHttpRequest2], GetResponseHeader method [XMLHttpRequest2],IXMLHTTPRequest2 interface, IXMLHTTPRequest2 interface [XMLHttpRequest2],GetResponseHeader method, IXMLHTTPRequest2.GetResponseHeader, IXMLHTTPRequest2::GetResponseHeader, ixhr2.ixmlhttprequest2_getresponseheader, msxml6/IXMLHTTPRequest2::GetResponseHeader
msxml6.h
Windows
Windows 8 [desktop apps \| UWP apps],MSXML 6.0 and later
Windows Server 2012 [desktop apps \| UWP apps]
Msxml6.idl
Windows
19H1
IXMLHTTPRequest2::GetResponseHeader
msxml6/IXMLHTTPRequest2::GetResponseHeader
c++
APIRef
kbSyntax
COM
msxml6.h
IXMLHTTPRequest2.GetResponseHeader

IXMLHTTPRequest2::GetResponseHeader

-description

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

-parameters

-param pwszHeader [in]

A case-insensitive header name.

-param ppwszValue [out, optional]

The resulting header information. You should free the memory for this parameter by calling the CoTaskMemFree function.

-returns

Returns S_OK on success.

-remarks

The results of this method are valid only after OnHeadersAvailable callback method has been called.

Examples

HRESULT hr = S_OK;
WCHAR *pwszHeaderValue = NULL;
IXMLHTTPRequest2 *pIXMLHTTPRequest2 = NULL;

// Create XMLHTTPRequest2 object and initialize pIXMLHTTP2Request.
hr = pIXMLHTTPRequest2->GetResponseHeader(L"Server", &pwszHeaderValue);
if(SUCCEEDED(hr))
{
   MessageBox(NULL, pwszHeaderValue, L"Response Header-Server", MB_OK);   
}   

if (pwszHeaderValue != NULL)
{
   CoTaskMemFree(pwszHeaderValue);
   pwszHeaderValue = NULL;
}

// Release pIXMLHTTPRequest2 when finished with it.

-see-also

CoTaskMemFree

GetAllResponseHeaders

IXMLHTTPRequest2

OnHeadersAvailable