Partager via


setRequestHeader Method (IXMLHTTPRequest) (Windows Embedded CE 6.0)

1/6/2010

Specifies the name of an HTTP header.

Script Syntax

oXMLHttpRequest.setRequestHeader(bstrHeader, bstrValue);

Remarks

Ee503131.collapse(en-US,WinEmbedded.60).gifScript 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".

Ee503131.collapse(en-US,WinEmbedded.60).gifScript Return Value

None.

Ee503131.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

HRESULT setRequestHeader(
  BSTR bstrHeader, 
  BSTR bstrValue
);

Remarks

Ee503131.collapse(en-US,WinEmbedded.60).gifC/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".

Ee503131.collapse(en-US,WinEmbedded.60).gifC/C++ Return Values

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

Ee503131.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

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

This method applies to the following interface:

IXMLHTTPRequest

See Also

Reference

XML HTTP Methods

Other Resources