From aa854f4e00381cb1e9c1ce10a76dac238ca20712 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Wed, 12 Jun 2024 21:35:56 -0400 Subject: [PATCH] Deal with nil rack.input with rack 3.1 --- lib/rspec_api_documentation/client_base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec_api_documentation/client_base.rb b/lib/rspec_api_documentation/client_base.rb index db0560a3..43824d1c 100644 --- a/lib/rspec_api_documentation/client_base.rb +++ b/lib/rspec_api_documentation/client_base.rb @@ -45,8 +45,8 @@ def process(method, path, params = {}, headers ={}) def read_request_body input = last_request.env["rack.input"] - input.rewind - input.read + input&.rewind + input&.read || "" end def document_example(method, path)