toland / patron

Ruby HTTP client based on libcurl
http://toland.github.com/patron/
MIT License
541 stars 73 forks source link

Add streaming upload/download support #139

Closed julik closed 6 years ago

julik commented 8 years ago

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?..

julik commented 6 years ago

Continued in #158