     query ||= {}
     uri = SC.prepareRequestURI(path, query)
     uri.query.format = "json"
-    #data = uri.encodeParams(uri.query) #uri.query = {}
-    
-    this.whenXDMReady =>
-      crossdomain.ajax({
-        type: method
-        url:  uri.toString()
-        #data: data
-        headers:
-          "Content-Type": "application/x-www-form-urlencoded"
-        error: (response) ->
-          obj = JSON.parse(response)
-          callback(obj)
-        success: (response) ->
-          obj = JSON.parse(response)
-          callback(obj)
-      })
+
+    if SC.options.flashXHR
+      uri.query["_status_code_map[400]"] = 200
+      uri.query["_status_code_map[401]"] = 200
+      uri.query["_status_code_map[403]"] = 200
+      uri.query["_status_code_map[404]"] = 200
+      uri.query["_status_code_map[422]"] = 200
+      uri.query["_status_code_map[500]"] = 200
+      uri.query["_status_code_map[503]"] = 200
+      uri.query["_status_code_map[504]"] = 200
+
+    if method == "PUT" || method == "DELETE"
+      uri.query._method = method
+      method = "POST"
+
+    if method != "GET"
+      data = uri.encodeParams(uri.query)
+      uri.query = {}
+
+    handleResponse = (responseText, xhr) ->
+      json = SC.Helper.JSON.parse(responseText)
+      error = null
+
+      if !json
+        if xhr
+          error = {message: "HTTP Error: " + xhr.status}
+        else
+          error = {message: "Unknown error"}
+      else if json.errors
+        error = { message: json.errors && json.errors[0].error_message }
+
+      callback(json, error)
+
+    if SC.options.flashXHR
+      this.whenRecordingReady ->
+        Recorder.request method, uri.toString(), data, handleResponse
+    else
+      this._request method, uri.toString(), data, handleResponse
+
+  _request: (method, uri, data, callback) ->
+    request = new XMLHttpRequest();
+    request.open(method, uri.toString(), true);
+    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
+    request.onreadystatechange = (e) ->
+      if(e.target.readyState == 4)
+        callback(e.target.responseText, e.target)
+    request.send(data);
 
   post:   (path, query, callback) ->
     this.request("POST",   path, query, callback)

      SC._popupWindow = SC.Helper.openCenteredPopup uri.toString(), 456, 510
    else
      throw "Either client_id and redirect_uri (for user agent flow) must be passed as an option"
    
  connectCallback: ->
    popupWindow = SC._popupWindow
    popupLocation = popupWindow.location.toString()

#################
# AUTHORIZATION #
#################

  connect: (options) ->
    options.client_id    ||= SC.options.client_id
    options.redirect_uri ||= SC.options.redirect_uri
    SC.connectCallbacks.success    = options.connected
    SC.connectCallbacks.error      = options.error
    SC.connectCallbacks.general    = options.callback

    if options.client_id && options.redirect_uri
      uri = new SC.URI("https://" + this.hostname() + "/connect/?")
      uri.query = 
