mirror of
https://github.com/penpot/penpot.git
synced 2025-05-30 13:36:14 +02:00
♻️ Refactor http client.
Start using Fetch API.
This commit is contained in:
parent
9a0f6018a7
commit
7d14aef393
15 changed files with 257 additions and 305 deletions
|
@ -15,7 +15,7 @@
|
|||
[app.main.fonts :as fonts]
|
||||
[app.main.exports :as exports]
|
||||
[app.worker.impl :as impl]
|
||||
[app.util.http-api :as http]
|
||||
[app.util.http :as http]
|
||||
["react-dom/server" :as rds]))
|
||||
|
||||
(defn- handle-response
|
||||
|
@ -39,6 +39,7 @@
|
|||
(->> (http/send! {:uri uri
|
||||
:query {:file-id file-id :id page-id}
|
||||
:method :get})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response)
|
||||
(rx/subs (fn [body]
|
||||
(resolve body))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue