status Property (IXMLHTTPRequest)

 

Represents the HTTP status code returned by a request.

lValue = oXMLHttpRequest.status;  

Example

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
xmlhttp.open("GET", "http://localhost/books.xml", false);
xmlhttp.send();
WScript.Echo(xmlhttp.status);

lValue = oXMLHttpRequest.status  

C/C++ Syntax

HRESULT get_status(long* plStatus);  

Parameters

plStatus [out, retval]
The returned status code, as a long integer.

The long integer status value is a standard HTTP status code as described in the following table:

NumberDescription
100Continue
101Switching protocols
200OK
201Created
202Accepted
203Non-Authoritative Information
204No Content
205Reset Content
206Partial Content
300Multiple Choices
301Moved Permanently
302Found
303See Other
304Not Modified
305Use Proxy
307Temporary Redirect
400Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Request Entity Too Large
414Request-URI Too Long
415Unsupported Media Type
416Requested Range Not Suitable
417Expectation Failed
500Internal Server Error
501Not Implemented
502Bad Gateway
503Service Unavailable
504Gateway Timeout
505HTTP Version Not Supported

Long integer. The property is read-only. It represents the returned status code as a long integer. This value is valid only after the send method returns successfully.

Implemented in:

MSXML 3.0, MSXML 6.0

IXMLHTTPRequest

send Method (IXMLHTTPRequest)
statusText Property (IXMLHTTPRequest)

Show: