   Other allowable keyword arguments are `:method`, `:content`, `:headers`,
   `:priority`, and `:retries`. `:method` defaults to \"GET\" and `:retries`
   defaults to `0`."
-  [id url & {:keys [method content headers priority retries on-success
-                    on-error]
+  [id url & {:keys [method content headers priority retries
+                    on-success on-error]
              :or   {method   "GET"
                     retries  0}}]
   (try
-    (add-responders id on-success on-error)
     (.send *xhr-manager*
            id
            url
            method
            content
-           headers
+           (when headers (.-strobj headers))
            priority
-           ;; This next one is a callback, and we could use it to get
-           ;; rid of the atom and figure out success/failure ourselves
-           nil
+           (partial handle-response on-success on-error)
            retries)
     (catch js/Error e
       nil)))
 
-(defn- response-success [e]
-  (when-let [{success :success} (get @responders (:id e))]
-    (success e)
-    (swap! responders dissoc (:id e))))
-
-(defn- response-error [e]
-  (when-let [{error :error} (get @responders (:id e))]
-    (error e)
-    (swap! responders dissoc (:id e))))
-
-(defn- response-received
-  [f e]
-  (f {:id     (.-id e)
-      :body   (. e/xhrIo (getResponseText))
-      :status (. e/xhrIo (getStatus))
-      :event  e}))
-
-(event/listen *xhr-manager* "success" (partial response-received response-success))
-(event/listen *xhr-manager* "error"   (partial response-received response-error))
+(defn url
+  [path]
+  (str (.-origin (.-location js/document)) path))
                        nil
                        0
                        5000))

(defn request
  "Asynchronously make a network request for the resource at url. If

(ns ^{:doc "Make network requests."}
  one.browser.remote
  (:require [goog.net.XhrManager   :as manager]))

(def ^:private
  *xhr-manager*
