Wojtek Mach
Wojtek Mach
I've added added `Req.Request.request/1` which can be used like this: ```elixir req = Req.new(url: "https://httpbin.org/status/500") Req.Request.request(req) do {:ok, request, response} -> IO.puts request.private.req_retry_count IO.puts "success: #{response.status}" {:error, request, exception} ->...
Not dead, the issue was about sendfile-based optimisation.
I'm not planning to add this in the short term but further discussion and PRs are welcome!
I think that would be possible outside of Req using process messaging described in comments above.
> If the caller needs the full body, why he is streaming? He can just call Req.get/1. Not sure I understand your point. Can you elaborate? Did you mean that...
I think I am going to go with the approach outlined above. I’d love to see a Req plugin that keeps response body a stream, see how the implementation ends...
Hey all, Finch is getting another way of response streaming that Req can use! See https://github.com/sneako/finch/pull/228 for more information. Let's continue Req aspects of that discussion here: > That said…...
In other words, perhaps Req just consumes initial bits, :status and :headers, and builds a response out of that which allows us to handle redirects and retries. But leaves everything...
> ```elixir > # If you're consuming well-formatted ndjson, you can easily do this: > Req.get!(url, stream: true).body > |> Stream.map(&Jason.decode/1) > |> Enum.each(&IO.inspect/1) > ``` right, I think this...
raw: false would let these response steps work on the response body and these steps would either a) crash, b) as a convention leave it unchanged (which is a decent...