setRequestHeader Method (ServerXMLHTTP/IServerXMLHTTPRequest)

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - DOM Reference

setRequestHeader Method (ServerXMLHTTP/IServerXMLHTTPRequest)

Specifies the name of an HTTP header.

Remarks

If another header already exists with this name, it is replaced.

[Script]

Script Syntax

oXMLServerHTTPRequest.setRequestHeader(bstrHeader, bstrValue);

Parameters

bstrHeader
The header name to set; for example, "depth". This parameter should not contain a colon and should be the actual text of the HTTP header.
bstrValue
The value of the header; for example, "infinity".
[Visual Basic]

Visual Basic Syntax

oXMLServerHTTPRequest.setRequestHeader(bstrHeader, bstrValue)

Parameters

bstrHeader
The header name to set; for example, "depth". This parameter should not contain a colon and should be the actual text of the HTTP header.
bstrValue
The value of the header; for example, "infinity".
[C/C++]

C/C++ Syntax

HRESULT setRequestHeader(BSTR bstrHeader, BSTR bstrValue);

Parameters

bstrHeader [in]
The header name to set; for example, "depth". This parameter should not contain a colon and should be the actual text of the HTTP header.
bstrValue [in]
The value of the header; for example, "infinity".

C/C++ Return Values

S_OK
The value returned if successful.

To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

getResponseHeader Method

Applies to: IServerXMLHTTPRequest/ServerXMLHTTP