lib/setsuzoku/service/web_service/api_strategy.rb in setsuzoku-0.10.12 vs lib/setsuzoku/service/web_service/api_strategy.rb in setsuzoku-0.11.0
- old
+ new
@@ -70,16 +70,18 @@
#
# @param response [HTTParty::Response] the response from the HTTP request.
# @param options [Hash] the parsing options. Generally the response_type. e.g. :xml, :json
#
# @return [Hash] the parsed hash of the response object.
- sig { override.params(response: Faraday::Response, options: T.untyped).returns(T::Hash[Symbol, T.untyped]) }
+ sig { override.params(response: Faraday::Response, options: T.untyped).returns(T.untyped) }
def parse_response(response:, **options)
case options[:response_type]
when :json
JSON.parse(response.body).deep_symbolize_keys
when :xml
convert_xml_to_hash(response.body)
+ when :html
+ response.body
else
JSON.parse(response.body).deep_symbolize_keys
end
end
\ No newline at end of file