Skip to content

Commit

Permalink
Merge pull request #3 from stitchfix/nil-dot-rewind-errors
Browse files Browse the repository at this point in the history
Fallback to StringIO to prevent nil.rewind errors
  • Loading branch information
samsm authored Jun 18, 2024
2 parents 8635155 + 712c228 commit f4e5508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/client_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def process(method, path, params = {}, headers ={})
end

def read_request_body
input = last_request.env["rack.input"]
input = last_request.env["rack.input"] || StringIO.new
input.rewind
input.read
end
Expand Down

0 comments on commit f4e5508

Please sign in to comment.