Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

burst.io.XmlHttpURIRequest Class Reference

Inheritance diagram for burst.io.XmlHttpURIRequest:

burst.io.AbstractURIRequest List of all members.

Detailed Description

Subclass of AbstractURIRequest using XMLHTTP object support.

This is not supported in all environments: only if bu_Runtime.has_HttpRequest() .

Microsoft calls their implementation object "XMLHTTP", and Mozilla calls theirs "XMLHttpRequest". Note that despite the name, they are able to to retrieve text/plain content as well as text/xml. Furthermore, they aren't limited to HTTP either, but also "file:" and "ftp:", depending on security restrictions.

The browser implementation of XMLHTTP is connected to its implementation of the Xml DOM, because when retrieving xml, a HttpRequest has a responseXML member which is an instance of DomDocument.

On IE, the XMLHTTP object (interface IXMLHTTPRequest) is used:

Note that Microsoft's IServerXMLHTTPRequest has additional methods such as waitForResponse:

On Mozilla, this is implemented with new XMLHttpRequest() . See:

Mozilla does a pretty good job of mimicking IE. So after the object is created and returned, essentially the same object methods can be used. We do provide some additional convenience methods in our wrapper.

Safari 1.2 mimics Mozilla.

When retrieving text/plain, the responseText variable holds the text content (transformed to a unicode string -- it can't be used to retrieve binary).

When retrieving text/xml, the responseXML variable is a DomDocument instance. In that case, the usual DOM methods apply to it, or its entire XML serialized string can be obtained via burst.xml.XmlDom.toXmlString .

The responseBody variable is an array of bytes of exactly the response body, which is part of the language-independent interfaces for both IE and Mozilla. However, it is not exposed to javascript. IE has typeof 'unknown' for httpreq.responseBody, and Mozilla has typeof 'undefined'.

For an overview of the XMLHTTP object, see:

There are still some research areas:

Note that RFC 2616 recommends a limit of two persistent connections from a client to any one server:

Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.
See http://www.w3.org/Protocols/rfc2616/rfc2616.html

Browsers have different conventions (not mandated by any RFC) about how many HTTP 1.0 connections they may hold to a server, and how many overall threads/connections (combined from all servers) they may maintain. For IE, see: http://support.microsoft.com/default.aspx?scid=kb;en-us;183110

Some caveats about IE's XMLHTTP implementation:

Some caveats about Mozilla's implementation:

Todo:
Whether both Mozilla and IE support the same transfer-encoding's as the browser.

Support the xml and http mechanisms available through Flash (XML.sendAndLoad(), etc.)

Consider Konqueror W3 "Load and Save" support.


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 04:03:08 2004 for BurstProject by doxygen 1.3.4