Closed tarcieri closed 11 years ago
This looks good to me - getting rid of that callback for the body block is nice, that code felt kind of ugly.
There's a bug somewhere in this code. I'm getting RequestBody#readpartial
returning an empty string for whatever reason, which it seems to be explicitly designed not to do.
Will continue investigating... and hopefully capture this case in a test
Encapsulate request bodies in their own object. This allows easy conversion to a string in cases where streaming isn't desired, or streaming as an IO-alike through #read and #readpartial
This is a breaking change from the previous API. People who were using request.body will now need to use request.body.to_s. The previous callback-based API for reading the body is completely removed.
/cc @adstage-david @raggi @halorgium