Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created December 17, 2014 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztellman/613629a2a32908d096d5 to your computer and use it in GitHub Desktop.
Save ztellman/613629a2a32908d096d5 to your computer and use it in GitHub Desktop.
(require '[manifold.stream :as s])
(defn streaming-response [ch]
{:status 200
:headers {"content-type" "text/plain"}
:body (s/->stream ch)})
@malcolmsparks
Copy link

There is no longer a manifold.stream/->stream in recent manifold releases - can you tell me if there's an alternative?

@malcolmsparks
Copy link

I think this is it :-

(require '[manifold.stream :as s])

(defn streaming-response [ch]
  {:status 200
   :headers {"content-type" "text/plain"}
   :body (s/->source ch)})

@malcolmsparks
Copy link

Yes, that was it. I tried it before but it wasn't working because of pebkac, so got myself in a twist. Sorry for the spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment