Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ServerSentEvents
- data EventStream
- type EventSource = SourceIO ServerEvent
- type EventSourceHdr = Headers '[Header "X-Accel-Buffering" Text] EventSource
- eventSource :: Proxy X () () ServerEvent IO () -> EventSourceHdr
- jsForAPI :: (HasForeign NoTypes NoContent api, GenerateList NoContent (Foreign NoContent api)) => Proxy api -> Text
Documentation
data ServerSentEvents Source #
Instances
data EventStream Source #
A type representation of an event stream. It's responsible for setting proper content-type and buffering headers, as well as for providing parser implementations for the streams. Read more on Servant Streaming Docs
Instances
type EventSource = SourceIO ServerEvent Source #
type EventSourceHdr = Headers '[Header "X-Accel-Buffering" Text] EventSource Source #
This is mostly to guide reverse-proxies like nginx
eventSource :: Proxy X () () ServerEvent IO () -> EventSourceHdr Source #