Adds custom HTTP headers to the request.
HRESULT setRequestHeader( BSTR bstrHeader, BSTR bstrValue );
- [in] BSTR that specifies the header name.
- [in] BSTR that specifies the header value.
Returns S_OK if successful, or an error value otherwise.
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.