IResponse::AddHeader

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

HRESULT AddHeader(
      BSTR bstrHeaderName,
      BSTR bstrHeaderValue
);

Parameters

  • bstrHeaderName
    [in] Contains the name of the HTTP header.

  • bstrHeaderValue
    [in] 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.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also