What's XMLHTTP?

Source: Internet
Author: User
Tags object header http request object model
Xml

What is XMLHTTP?

The most common definition is: XMLHTTP is a set of APIs that can be routed through HTTP protocols or receive XML and other data from a scripting language such as JavaScript, VbScript, and JScript. The biggest use of XMLHTTP is that you can update portions of a Web page without refreshing the entire page.
Explanation from MSDN: XMLHTTP provides a protocol for clients to communicate with HTTP servers. The client can pass the XMLHTTP object (MSXML2). xmlhttp.3.0) Send a request to the HTTP server and use the Microsoft XML Document Object model Microsoft? The XML Document Object Model (DOM) handles the response.

Now the absolute majority of browsers have increased support for XMLHTTP, ie in the use of ActiveXObject way to create XMLHTTP objects, other browsers such as: Firefox, Opera and so on through Window.xmlhttprequest to create XMLHTTP objects.

XMLHTTP Object reference:

Property:

onreadystatechange* Specifies the event handling handle when the ReadyState property changes. Write only
readyState Returns the status of the current request, read-only.
Responsebody Returns the body of the response message as a unsigned byte array. Read Only
Responsestream Returns the response information in the form of an ADO Stream object. Read-only
ResponseText Returns the response information as a string. Read Only
Responsexml Formats the response information as an XML Document object and returns a read-only
Status Returns the HTTP status code for the current request. Read Only
StatusText Returns the response line state of the current request, read-only

* Indicates that this property is an extension of the Document Object model for the consortium.

Method:

Create a new HTTP request and specify the method, URL, and authentication information (username/password) for this request that specifies the request individually
abort Cancel the current request
getallresponseheaders
getresponseheader Get the specified HTTP header
open
send
setrequestheader an HTTP header

Event:

No

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.