lib/rspec_api_docs/formatter/resource/example.rb in rspec-api-docs-0.13.0 vs lib/rspec_api_docs/formatter/resource/example.rb in rspec-api-docs-0.14.0

- old
+ new

@@ -124,11 +124,13 @@ uri.query = request.query_string unless request.query_string.empty? end.to_s end def request_body(body) - body = body.read - body.empty? ? nil : body + body.rewind if body.respond_to?(:rewind) + body_content = body.read + body.rewind if body.respond_to?(:rewind) + body_content.empty? ? nil : body_content end def response_body(body) unless body.empty? parsed_body = JSON.parse(body, symbolize_names: true)