                        error-type (cond
                                     ok nil
                                     (= status 403) :unauthorized
-                                   :else :http-error)
+                                    :else :http-error)
                        handle-data (fn [data]
                                      (if ok
                                        (on-success {:data data :status status :ok ok})
                                        (on-error   {:data data :status status :type error-type})))
                        has-json (if (nil? parse-json) false
-                                      parse-json)]
+                                    parse-json)]
 
                    (-> (if has-json
                          (-> (.json res)
                              (.then #(js->clj %1 :keywordize-keys true))
-                             (.then #(if (vector? %1)
-                                        (vec (map clojure.walk/keywordize-keys %1))
-                                        %1)))
+                             (.then
+                              #(if (vector? %1)
+                                 (vec (map clojure.walk/keywordize-keys %1))
+                                 %1)))
                          (.text res))
                        (.then #(do (log %) %))
                        (.then handle-data))))))))

        path           (apply str (map (partial str "/") endpoint-path))
        req-url        (if (nil? endpoint)
                         url
                         ;(get-url endpoint)
                          (str (get-url endpoint) path))
        optional-body  (if body
                         {"body" (js/JSON.stringify (clj->js body))}
                         {})

        args (merge {
                     "method"   method
                     "credentials" "include"
                     "headers" headers}
                    optional-body)
        query (react-fetch req-url (clj->js args))]


    (log "fetch-no-response:" method req-url headers)
    (handle-fetch-promise query :on-error on-error :on-success on-success :parse-json false)))

        path           (apply str (map (partial str "/") endpoint-path))
        req-url        (if (nil? endpoint)
                         url
                         ;;(get-url endpoint)
                         (str (get-url endpoint) path))

        default-header {"Content-Type" "application/json" "Accept" "application/json"}
        optional-body  (if body
                         {"body" (js/JSON.stringify (clj->js body))}
                         {})

        args (merge {"method"   method
                     "credentials" "include"
                     "headers" (merge default-header headers)}
                    optional-body)
