Streaming request body for servant-client-core#913
Conversation
|
Tests are failing on 7.8.4 for reasons that don't have anything to do with the PR. I tried reproducing it locally but can't. @phadej any ideas? |
bb49f90 to
e3158d7
Compare
|
@phadej @alpmestan can I merge? |
|
Oh, I haven't seen this. I'll take a look tomorrow and merge if only small stuff there's
…Sent from my iPhone
On 11 Mar 2018, at 23.37, Julian Arni ***@***.***> wrote:
@phadej @alpmestan can I merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
I took a quick glance and I'm not particularly fond of replicating http-client API in the servant-client-core. It feels like a step back. I'Il think a little harder tomorrow |
I thought that was what we had come up with over IRC. But if there are nicer alternatives I'm all for them. The only constructor in |
|
Any updates? |
| where | ||
| lotsGenerator f r = do | ||
| f "" | ||
| withFile "/dev/urandom" ReadMode $ |
There was a problem hiding this comment.
can we use random / tf-random etc. and not drain the (somewhat slow) secure random device?
There was a problem hiding this comment.
Tried random and bytestring-random, but they used a lot more CPU and failed (without clear error messages) on CI.
I can remove this test entirely, though
There was a problem hiding this comment.
I have one unrelated to streaming change request, otherwise this is ok. We can change the servant-client-core RequestBody again when we are wiser.
Also, does it work with servant-client-ghcjs, if there is an easy way to check, it would be great.
EDIT s/Request/RequestBody/
|
Good call on testing GHCJS. I'm trying to do that but keep running into problems. Will update here when it works. |
672ff4a to
ba33b61
Compare
Mimicking http-client's RequestBody.
Streaming is not actually performed - instead the whole object is
held in memory.
ba33b61 to
41ca5ad
Compare
Using random packages mysteriously fail on CI, and also uses a lot
more CPU.
41ca5ad to
7c901dc
Compare
|
@jkarni how can I help get this finalized? |
|
@domenkozar finalized :) Well, at least, modulo releasing it. |
Fixes #886.
I also added tests to check that
Streamran in constant memory while I was at it.