/* moo 1.1
XHR.prototype.send = function(url, data){
		if (this.options.autoCancel) this.cancel();
		else if (this.running) return this;
		this.running = true;
		if (data && this.options.method == 'get') url = url + (url.contains('?') ? '&' : '?') + data, data = null;
		var transportMethod = this.options.method;
		if (transportMethod == 'post')	transportMethod = 'POST';
		this.transport.open(transportMethod, url, this.options.async);
		this.transport.onreadystatechange = this.onStateChange.bind(this);
		if ((this.options.method == 'post') && this.transport.overrideMimeType) this.setHeader('Connection', 'close');
		$extend(this.headers, this.options.headers);
		for (var type in this.headers) try {this.transport.setRequestHeader(type, this.headers[type]);} catch(e){};
		this.fireEvent('onRequest');
		this.transport.send($pick(data, null));
		return this;
	};

*/

/* moo 1.0 
*/
XHR.prototype.send = function(url, data){
                this.fireEvent('onRequest');
                var transportMethod = this.options.method;
				if (transportMethod == 'post')	transportMethod = 'POST';		
                this.transport.open(transportMethod, url, this.options.async);
                this.transport.onreadystatechange = this.onStateChange.bind(this);
                if (this.options.method == 'post'){
                        this.setHeader('Content-type', 'application/x-www-form-urlencoded');
                        if (this.transport.overrideMimeType) this.setHeader('Connection', 'close');
                }
                Object.extend(this.headers, this.options.headers);
                for (var type in this.headers) this.transport.setRequestHeader(type, this.headers[type]);
                this.transport.send(data);
                return this;
}
