Skip to content

Commit

Permalink
Rack input is now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
danivovich committed Jun 11, 2024
1 parent d32bf17 commit 970ea6e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/rspec_api_documentation/client_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ def process(method, path, params = {}, headers ={})
end

def read_request_body
input = last_request.env["rack.input"]
input.rewind
input.read
if input = last_request.env["rack.input"]
input.rewind
input.read
else
""
end
end

def document_example(method, path)
Expand Down

0 comments on commit 970ea6e

Please sign in to comment.