rest-client/rest-client — pull request #220 by scotchi (2013-08-20 14:23:19+00:00)
Title: For streams, actually use a stream

Duplicate of #217 for master

This avoids loading all of the data to be transmitted into memory.

If you're doing a PUT or POST of a large resource using a file handle, this will read directly from the handle rather than first schlurping everything into memory.

Since Payload creates an internal stream anyway, this simply uses that for all data types.

It seems to break some of the tests, but because the tests were using invalid requests in the first place, as far as I can tell. I applied this to the 1.6 branch for our own use as well.