Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn GET [url]
- (let [ch (chan 1)]
- (xhr/send url
- (fn [event]
- (let [res (-> event .-target .getResponseJson (js->clj :keywordize-keys true))]
- (go (>! ch res)
- (close! ch)))))
- ch))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement