IResponse::AddHeader

The IResponse::AddHeader method adds an HTTP header to the HTTP response. For more information, see the AddHeader method of the Response object.

HRESULT AddHeader(
  BSTR bstrHeaderName,  //a binary string that contains the name of 
                        // the HTTP header
  BSTR bstrHeaderValue  //a binary string that contains the header 
                        // value
);
 

Parameters

bstrHeaderName
A binary string that contains the name of the HTTP header.
bstrHeaderValue
A binary string that contains the HTTP header value.

Remarks

This method adds an HTTP header with a specified value; it also always adds a new HTTP header to the response. It will not replace an existing header of the same name. Once a header has been added, it cannot be removed.

See Also

Response Object