It seems like wai's responseStream should allow streaming server-sent events, but when I do
import qualified Network.HTTP.Client as H
import qualified Network.Wai as W
…
respond $ W.responseStream
(H.responseStatus response)
(H.responseHeaders response)
(H.responseBody response)
it still all comes as one response. I'm guessing it's H.responseBody that consumes it, but that's just a getter like Response body -> body – how do I make it proxy the stream?
Found a solution via Streaming bytestring as WAI HTTP server response body (though without depending on
Streaming):