File tree 2 files changed +2
-2
lines changed
lib/pact/mock_service/request_handlers
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def request_method
23
23
end
24
24
25
25
def respond env
26
- request_body = JSON . load ( env [ 'rack.input' ] . string )
26
+ request_body = JSON . load ( env [ 'rack.input' ] . read )
27
27
parsing_options = { pact_specification_version : pact_specification_version }
28
28
interactions = request_body [ 'interactions' ] . collect { | hash | Interaction . from_hash ( hash , parsing_options ) }
29
29
begin
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def request_method
25
25
end
26
26
27
27
def respond env
28
- body = env [ 'rack.input' ] . string
28
+ body = env [ 'rack.input' ] . read
29
29
consumer_contract_details = body . size > 0 ? JSON . parse ( body , symbolize_names : true ) : { }
30
30
consumer_contract_params = default_options . merge ( consumer_contract_details . merge ( interactions : verified_interactions ) )
31
31
consumer_contract_writer = ConsumerContractWriter . new ( consumer_contract_params , logger )
You can’t perform that action at this time.
0 commit comments