lib/reel/request/body.rb in reel-0.5.0 vs lib/reel/request/body.rb in reel-0.6.0.pre1

- old
+ new

@@ -27,9 +27,13 @@ while chunk = readpartial yield chunk end end + def empty? + to_str.empty? + end + # Eagerly consume the entire body as a string def to_str return @contents if @contents raise StateError, "body is being streamed" unless @streaming.nil?