ArticleDirectory
- What is XMLHTTP?
- XMLHTTP object reference:
What is XMLHTTP?
The most common definition is: XMLHTTP is a set of APIs that can be transmitted over HTTP or receive XML and other data in scripting languages such as JavaScript, VBScript, and JScript. XMLHTTP can be used to update part of the webpage without refreshing the entire page.
Explanation from msdn: XMLHTTP provides the protocol for communication between the client and the HTTP server. The client can send a request to the HTTP server through the XMLHTTP object (msxml2.xmlhttp. 3.0) and process the response using the Microsoft XML Document Object Model (DOM.
Currently, most browsers have added support for XMLHTTP. in IE, XMLHTTP objects are created using activexobject. other browsers, such as Firefox and opera, use window. XMLHttpRequest to create XMLHTTP objects.
XMLHTTP Object Reference: properties:
| Onreadystatechange * |
Specifies the event processing handle when the readystate attribute changes. Write only |
| Readystate |
Returns the status of the current request, read-only. |
| Responsebody |
Returns the response body in the unsigned byte array. Read-Only |
| Responsestream |
Return the response information in the form of an ADO Stream object. Read-Only |
| Responsetext |
Returns the response information as a string. Read-Only |
| Responsexml |
Format the response information as an XML Document Object and return it. Read-Only |
| Status |
Returns the HTTP status code of the current request. Read-Only |
| Statustext |
Returns the response line status of the current request, read-only |
* Indicates that this attribute is an extension of the W3C Document Object Model.
Method:
| Abort |
Cancel current request |
| GetAllResponseHeaders |
Get all HTTP headers of the response |
| GetResponseHeader |
Obtain the specified HTTP header from the response information |
| Open |
Create a new HTTP request and specify the request method, URL, and authentication information (User Name/password) |
| Send |
Send a request to the HTTP server and receive a response |
| SetRequestHeader |
Specify an HTTP header of the Request separately |
Event:
None