 (ns todo-clj.core
   (:require [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
-            [ajax.core :refer [GET POST ajax-request json-request-format json-response-format]]))
+            [ajax.core :refer [GET POST]]))
 
 (enable-console-print!)
 


(defn add-todo [app owner]
  (let [title (.-value (om/get-node owner "new-todo"))]    
    (POST "/todos" {:handler #(om/transact! app :todos (fn [todos]
                                                         (println (conj todos %))
                                                         (conj todos %)))
                    :error-handler trace
                    :params {:title title}
                    :format :json

                     :response-format :json}))
    om/IRender
    (render [_]
      (dom/div nil
        (dom/h1 nil "Todo")
        (dom/div nil
