Skip to content

Commit

Permalink
small fix to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bflyblue committed Sep 5, 2024
1 parent cc834bc commit f9a2186
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
> server :: Server MyApi
> server = streamBooks
> where streamBooks :: Handler (SourceIO Book)
streamBooks = pure $ source [book1, ...]
> streamBooks = pure $ source [book1, ...]
## 0.2.1.0 -- 2021-04-21

Expand Down
4 changes: 2 additions & 2 deletions src/Servant/API/EventStream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ instance ToServerEvent ServerEvent where
> server :: Server MyApi
> server = streamBooks
> where streamBooks :: Handler (SourceIO Book)
streamBooks = pure $ source [book1, ...]
> streamBooks = pure $ source [book1, ...]
-}
instance {-# OVERLAPPABLE #-} (ToServerEvent chunk, ToSourceIO chunk a) => HasServer (ServerSentEvents a) context where
type ServerT (ServerSentEvents a) m = ServerT (StreamGet ServerEventFraming EventStream a) m
Expand Down Expand Up @@ -140,7 +140,7 @@ instance Accept EventStream where
> server :: Server MyApi
> server = streamBooks
> where streamBooks :: Handler (RecommendedEventSourceHeaders (SourceIO Book))
streamBooks = pure $ recommendedEventSourceHeaders $ source [book1, ...]
> streamBooks = pure $ recommendedEventSourceHeaders $ source [book1, ...]
-}
type RecommendedEventSourceHeaders (a :: Type) = Headers '[Header "X-Accel-Buffering" Text, Header "Cache-Control" Text] a

Expand Down

0 comments on commit f9a2186

Please sign in to comment.