Share via


setRequestHeader Method (IXMLHTTPRequest) (Windows CE 5.0)

Send Feedback

Specifies the name of an HTTP header.

[Script]

Script Syntax

oXMLHttpRequest.setRequestHeader(bstrHeader, bstrValue);

Script Parameters

  • bstrHeader
    String. 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
    String. Value of the header; for example, "infinity".

Script Return Value

None.

[C/C++]

C/C++ Syntax

HRESULT setRequestHeader(BSTRbstrHeader,BSTRbstrValue);

C/C++ Parameters

  • bstrHeader
    [in] 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] Value of the header, for example, "infinity".

C/C++ Return Values

  • S_OK
    Value returned if successful.
  • E_INVALIDARG
    Value returned if either input argument is NULL.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

General Remarks

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

This method applies to the following interface:

IXMLHTTPRequest

See Also

getResponseHeader Method

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.