Click to return to the XML (Extensible Markup Language) home page    
IXMLHttpRequest::onreadys...     IXMLHttpRequest::readySta...     IXMLHttpRequest Interface    
Web Workshop  |  XML (Extensible Markup Language)

IXMLHttpRequest::open Method


Initializes a Microsoft.XMLHTTP request, and specifies the method, URL, and authentication information for the request.

Visual Basic Syntax

oXMLHttpRequest.open(bstrMethod, bstrUrl, varAsync, bstrUser, bstrPassword)

C/C++ Syntax

HRESULT open(
    BSTR bstrMethod,
    BSTR bstrUrl,
    VARIANT bAsync,
    VARIANT bstrUser,
    VARIANT bstrPassword);

Parameters

bstrMethod
[in] HTTP method used to open the connection, such as PUT or PROPFIND.
bstrUrl
[in] Requested URL. This must be an absolute URL, such as "http://Myserver/Mypath/".
bAsync
[in, optional] Indicator as to whether the call is asynchronous. The default is true (the call blocks until it returns). This parameter must be a Boolean (true or false) expression.
bstrUser
[in, optional] Name of the user for authentication. If this parameter is NULL ("") or missing and the site requires authentication, the component displays a logon window.
bstrPassword
[in, optional] Password for authentication. This parameter is ignored if the user parameter is NULL or missing.

C/C++ Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

The values of the request headers, request body, response headers, and response body must be cleared before calling this method.

See Also

abort



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.