Share via


abort Method (ServerXMLHTTP-IServerXMLHTTPRequest)

 

Cancels the current HTTP request.

JScript Syntax

oServerXMLHttpRequest.abort();  

Example

var xmlServerHttp;
xmlServerHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.3.0");
xmlServerHttp.onreadystatechange = doServerHttpReadyStateChange;
xmlServerHttp.open("GET", "https://localhost/sample.xml", true);
xmlServerHttp.send();

function doServerHttpReadyStateChange() {
   if (xmlServerHttp.readyState == 2) {
      xmlServerHttp.abort();
   }
}

C/C++ Sntax

HRESULT abort(void);  

C/C++ Return Values

S_OK
The value returned if successful.

Remarks

The object will be returned to the UNINITIALIZED state, and open method must be called next.

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

Applies to

IServerXMLHTTPRequest-ServerXMLHTTP

See Also

readyState Property (ServerXMLHTTP-IServerXMLHTTPRequest)
open Method (ServerXMLHTTP-IServerXMLHTTPRequest)