Allow to specify a status for streaming endpoints#966
Allow to specify a status for streaming endpoints#966phadej merged 1 commit intohaskell-servant:masterfrom
Conversation
|
Your other PR has been merged, so you can rebase this one now :) |
|
Rebased |
|
Test(s) would be great as well. |
|
How would I write a test for this? I guess I somehow have to assert the status code, but I am not sure how to get that status with clientM. I am only using servant-server myself |
|
Hmm... the stream tests are in StreamSpec: https://github.com/gbaz/servant/blob/db13077ccb93223e606ace6f7a67ac9389375a6a/servant-client/test/Servant/StreamSpec.hs You can probably test for status codes as in: https://github.com/gbaz/servant/blob/db13077ccb93223e606ace6f7a67ac9389375a6a/servant-client/test/Servant/ClientSpec.hs#L338 |
|
|
|
Currently streaming endpoints only return a |
|
I can confirm that this works. I was able to implement HTTP range requests with Servant and Conduit: jvanbruegge/media-goggler@b77da5e |
Currently streaming endpoints are always returning
200 OK. With this it is not possible to implement e.g. Range Requests, as those need to return206 Partial Content. This PR changes this.