mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
there was a long-standing buggy workaround, whereas in stream-mode, when there was no response yet to query from, a synchronous request would be fired. This would break when under event streams, so we had to document this as "make sure that...". This fixes it by implementing a general session API convention, which separates the step of sending the requests, from waiting for its receival. And, given that the request knows when the response is available, we can actually "tick until response". This might be used in the future to refactor the way we handle the responses, which buffer the full payload by default, instead of reading from the connection at will.