Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

setRequestHeader method

Adds custom HTTP headers to the request.

Syntax


HRESULT retVal = object.setRequestHeader(bstrHeader, bstrValue);

Parameters

bstrHeader [in]

Type: BSTR

BSTR that specifies the header name.

bstrValue [in]

Type: BSTR

BSTR that specifies the header value.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Standards information

Remarks

Refer to RFC2616, Section 14: Header Field Definitions for a general list of standard headers. The server is ultimately responsible for honoring the headers of the request. By far the most common request header is Content-Type, which is required by some XML Web services.

IHTMLXMLHttpRequest::setRequestHeader was introduced in Windows Internet Explorer 7.

See also

IHTMLXMLHttpRequest::getResponseHeader

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.