I am looking for an idiomatic way to do the following. I have a http server that on a particular GET request responds with a stream of messages. Now, since this message is n
(ns asyncfun.core
(:require [clojure.core.async :as async
:refer [!! go chan]]
[clj-http.client :as client]))
(def url "http://hopey.netfonds.no/tradedump.php?date=20150508&paper=AAPL.O&csv_format=txt")
(def out-chan (chan))
(go (println (!! out-chan (client/get url))
I put this code together in a couple minutes. I think core.async is what you are looking for.