         path           (apply str (map (partial str "/") endpoint-path))
         req-url        (if (nil? endpoint)
                          url
-                         ;(get-url endpoint)
-                          (str (get-url endpoint) path))
+                         ;;(get-url endpoint)
+                         (str (get-url endpoint) path))
         optional-body  (if body
                          {"body" (js/JSON.stringify (clj->js body))}
                          {})
 
-        args (merge {
-                     "method"   method
+        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)

(defn- handle-fetch-promise
  [promise & {:keys [on-success on-error parse-json]}]
  (-> promise
      ;; network error
      (.catch (fn [err] (on-error {:data err :type :network-error})))

      ;; fecth resolves also 400 and 500 errors
      (.then (fn [res]
               (if (not (nil? res))
                 (let [ok (.-ok res)
