   {:tag Request}
   (prepare-request :get url))
 
+(defn convert-action
+  "Converts action (:abort, nil) to Async client STATE."
+  [action]
+  {:tag com.ning.http.client.AsyncHandler$STATE}
+  (if (= action :abort)
+    com.ning.http.client.AsyncHandler$STATE/ABORT
+    com.ning.http.client.AsyncHandler$STATE/CONTINUE))
+
 (defn execute-request
   "Executes provided reqeust with given callback functions."
   ([#^Request req]

(defn ignore-headers [id headers])

(defn print-headers [id headers]
  (doall (map #(println (str id "> " % ": " (get headers %))) (keys headers))))

(defn accept-ok [id status]
  (if (not (= (:code status) 200)) :abort))

(defn print-status [id st]
  (println (str id "> "
		(:protocol st) "/" (:major st) "." (:minor st) " "
		(:code st) " " (:text st))))


  ([#^Request req body-fn completed-fn headers-fn]
     (execute-request req body-fn completed-fn headers-fn print-status))
  ([#^Request req body-fn completed-fn headers-fn status-fn]
     (println
      (str req " " body-fn " " completed-fn " " headers-fn " " status-fn))
     (let [id (gensym "req-id__")]
       (.executeRequest
	ahc req
	(proxy [AsyncHandler] []
