haskell-servant / haskell-servant/servant
Add a test for streaming of response bodies using lazy Bytestrings in 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
Assessment
This issue has not been assessed yet.