  :update-server
  [check-spec]
  (fn [{db :db} [_ url]]
-   {:http-xhrio {:method :post
-                 :uri (str url "/elfeed/update")
-                 :format :json
-                 :response-format (ajax/json-response-format {:keywords? true})
-                 :on-success [:success-update-server]
-                 :on-failure [:failure-update-server]}
+   {:http-xhrio (merge default-http-xhrio-attrs
+                       {:uri (str url "/elfeed/update")
+                        :on-success [:success-update-server]
+                        :on-failure [:failure-update-server]})
     :db (assoc db :server {:url url :checking? true})}))
 
 (reg-event-fx

   db))

(defn fetch-entry-content [{db :db} [_event-id entry]]
  {:http-xhrio {:method :post
                :uri (str (:url (:server db)) "/elfeed/content/" (:content entry))
                :format :json
                :response-format (ajax/text-response-format)
                :on-success [:success-fetch-entry-content (:webid entry)]
                :on-failure [:failure-fetch-entry-content]}
   :db (-> db
           (assoc :error-entry false
                  :current-entry (:webid entry)

 (fn [{db :db} [_ url ]]
   (let [events {:db (assoc db :server {:url url :checking? true})}]
     (if (valid-url? url)
       (merge events {:http-xhrio (merge default-http-xhrio-attrs
                                         {:uri (str url "/elfeed/update")
                                          :on-success [:success-save-server]
                                          :on-failure [:failure-save-server]})})
       (merge events {:dispatch [:failure-save-server {:status-text "Invalid URL (should start with http://)"}]})))))

(reg-event-fx
