anaisbetts / ModernHttpClient

HttpClient implementations that use platform-native HTTP clients for :rocket:
MIT License
659 stars 261 forks source link

Add streaming support for HTTP requests #66

Open AArnott opened 10 years ago

AArnott commented 10 years ago

In code review I noticed that HTTP request bodies (at least in your iOS implementation) are completely buffered before submitting the HTTP request. This makes it impossible to (for example) send a large file (say, a database for example) that exceeds the memory limits of the device.

Is this an NSUrlSession limitation, or can this be fixed in a pull request?

anaisbetts commented 10 years ago

I believe this is possible, yeah - we need to call the BodyStream setter instead of Body. I'd definitely take a pull request to fix this!

ericgreenmix commented 9 years ago

Android OkHttp requests are buffered as well.

dangduc commented 9 years ago

Hi, is anyone working on this? Uploading/download large video files is one of our use-cases.