        (assoc :fetching-entries? false)
        (assoc :error-entries error))))
 
-(reg-event-db
+(reg-event-fx
  :mark-entry-as-read
- (fn [db [_ entry]]
-   (let [url (str (:server db) "/elfeed/mark-read" "?webid=" (js/encodeURIComponent (:webid entry)))]
-     (POST
-         url
-         {:handler (fn [data]
-                     )
-          :format :json
-          :error-handler (fn [error]
-                           
-                           )}))
-   (-> db
-       (update :recent-reads (fn [coll]
-                               (if coll
-                                 (conj coll (:webid entry))
-                                 #{(:webid entry)}))))))
-
-(reg-event-db
+ (fn [{db :db} [_ entry]]
+   {:http-xhrio {:method :post
+                 :uri (str (:server db) "/elfeed/mark-read" "?webid=" (js/encodeURIComponent (:webid entry)))
+                 :format :json
+                 :response-format (ajax/json-response-format)
+                 :on-success [:process-mark-entry-as-read]
+                 :on-failure [:process-mark-entry-as-read-error]}
+    :db (update db :recent-reads (fn [coll]
+                                   (if coll
+                                     (conj coll (:webid entry))
+                                     #{(:webid entry)})))}))
+
+(reg-event-db
+ :process-mark-entry-as-read
+ (fn [db [_ response]]
+   db))
+
+(reg-event-db
+ :process-mark-entry-as-read-error
+ (fn [db [_ error]]
+   db))
+
+(reg-event-fx
  :fetch-entry-content
- (fn [db [_ entry]]
-   (let [url (str (:server db) "/elfeed/content/" (:content entry))]
-     (POST url
-         {:handler (fn [data]
-                     (dispatch [:process-remote-entry entry data])
-                     (dispatch [:mark-entry-as-read entry]))
-          :error-handler (fn [error]
-                           (dispatch [:process-remote-entry-error error]))}))
-   (-> db
-       (assoc :error-entry false)
-       (assoc :current-entry (:webid entry))
-       (assoc-in [:entries-m (:webid entry)] entry)
-       (assoc :fetching-entry? true))))
+ (fn [{db :db} [_ entry]]
+   {:http-xhrio {:method :post
+                 :uri (str (:server db) "/elfeed/content/" (:content entry))
+                 :format :json
+                 :response-format (ajax/text-response-format)
+                 :on-success [:process-remote-entry entry]
+                 :on-failure [:process-remote-entry-error]}
+    :db (-> db
+            (assoc :error-entry false
+                   :current-entry (:webid entry)
+                   :fetching-entry? true)
+            (assoc-in [:entries-m (:webid entry)] entry))}))
 
 (reg-event-db
  :process-remote-entry
  ->ls
  (fn [db [_ entry response]]
+   (dispatch [:mark-entry-as-read entry])
    (-> db
        (assoc :fetching-entry? false)
        (assoc-in [:entries-m (:webid entry) :content-body] response))))

       (assoc :loading-remotely? false)
       (assoc :remote-error error))))

(reg-event-db
 :fetch-entries
 (fn [db _]
   (let [url (str (:server db) "/elfeed/search?q=" "@15-days-old %2bunread")]
     (POST
         url
         {:handler (fn [data]
                     (dispatch [:process-remote-entries data]))
          :error-handler (fn [error]
                           (dispatch [:process-remote-entries-error error]))
          :response-format :json
          :keywords? true}))
   (-> db
       (assoc :error-entries false)
       (assoc :fetching-entries? true))))

(reg-event-db
 :process-remote-entries

       (assoc :fetching-entry? false)
       (assoc :error-entry error))))

(reg-event-fx
 :fetch-update-time
 (fn [{db :db} _]
   {:http-xhrio {:method :post
                 :uri (str (:server db) "/elfeed/update")
                 :params {:time (:update-time db)}
                 :format :json
                 :response-format (ajax/json-response-format {:keywords? true})
                 :on-success [:process-remote-update-time]
                 :on-failure [:process-remote-update-time-error]}
    :db (assoc db :fetching-update-time true)}))

(reg-event-db
 :process-remote-update-time
