It is tricky because currently we unlock the GIL for the entire duration of the request. However, if we make a branch for the case where streaming is desired, we could actually make the locks/unlocks more granular (per chunk).
I think it might be plausible to have streaming for both the request and response. For the response it would need separate methods (like get_streaming, put_streaming) when you want to deal with the response in a streaming fashion, and for the request we could have a convention of handling objects that are not Strings but do respond to each as iterator sources?..
It is tricky because currently we unlock the GIL for the entire duration of the request. However, if we make a branch for the case where streaming is desired, we could actually make the locks/unlocks more granular (per chunk).
I think it might be plausible to have streaming for both the request and response. For the response it would need separate methods (like
get_streaming
,put_streaming
) when you want to deal with the response in a streaming fashion, and for the request we could have a convention of handling objects that are not Strings but do respond toeach
as iterator sources?..