lib/soaspec/exchange_handlers/response_extractor.rb in soaspec-0.2.17 vs lib/soaspec/exchange_handlers/response_extractor.rb in soaspec-0.2.18

- old
+ new

@@ -22,12 +22,12 @@ # @param [Object] response Response object # @return [Hash] Hash representing response body def to_hash(response) case Interpreter.response_type_for(response) - when :xml then parse_xml(response.body.to_s) + when :xml then IndifferentHash.new(parse_xml(response.body.to_s)) when :json - JSON.parse(response.body.to_s) + IndifferentHash.new(JSON.parse(response.body.to_s)) else raise "Unable to interpret type of #{response.body}" end end