lib/protocol/http/body/wrapper.rb in protocol-http-0.26.3 vs lib/protocol/http/body/wrapper.rb in protocol-http-0.26.4
- old
+ new
@@ -49,14 +49,18 @@
# Read the next available chunk.
def read
@body.read
end
- def as_json
+ def as_json(...)
{
class: self.class.name,
body: @body&.as_json
}
+ end
+
+ def to_json(...)
+ as_json.to_json(...)
end
def inspect
@body.inspect
end