XMLHttpRequest Object W3C Working Draft

I found this article over at Ajaxian. W3C has taken notice of the use of the XMLHttpRequest and has decided to standardize it! w00t! W3C says:

The XMLHttpRequest object is implemented today, in some form, by many popular Web browsers. Unfortunately the implementations are not completely interoperable. The goal of this specification is to document a minimum set of interoperable features based on existing implementations, allowing Web developers to use these features without platform-specific code. In order to do this, only features that are already implemented are considered. In the case where there is a feature with no interoperable implementations, the authors have specified what they believe to be the most correct behavior.

This is pretty exciting because we can now see a proposed consistent method for using the object will be solidified in future browsers! Now…lets hope the browsers implement it quickly :) Oh, and here’s an example of setting a Request Header:

// The following script:
var r = new XMLHttpRequest();
r.open('get', 'demo.cgi');
r.setRequestHeader('X-Test', 'one');
r.setRequestHeader('X-Test', 'two');

// ...would result in the following header being sent:
X-Test: one, two