haskell-servant / haskell-servant/servant

Add a test for streaming of response bodies using lazy Bytestrings in servant-server

Open
#612 11 comments 0 reactions 0 assignees View on GitHub
help wanted servant-server
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

Currently unfortunately this is not supported. [MimeRender](https://www.stackage.org/haddock/lts-7.2/servant-0.8.1/Servant-API-ContentTypes.html#t:MimeRender) is the class that is used to create response bodies. `mimeRender` returns lazy `ByteString`s so `servant-server` could stream the response lazily, but I have no idea whether it does that or not. And even if it did we have no test making sure that this property will not break at some point.

Btw, there's a test that makes sure streaming of request bodies works in `servant-server`: [StreamingSpec.hs](https://github.com/haskell-servant/servant/blob/master/servant-server/test/Servant/Server/StreamingSpec.hs). I think a test for streaming responses would look similar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.