setRequestHeader Method (ServerXMLHTTP-IServerXMLHTTPRequest)

 

Specifies the name of an HTTP header.

JScript 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++ 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".

Return Values

S_OK
The value returned if successful.

Remarks

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

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

See Also

getResponseHeader Method (ServerXMLHTTP-IServerXMLHTTPRequest)
IServerXMLHTTPRequest-ServerXMLHTTP