lib/httpx/transcoder/xml.rb in httpx-0.21.1 vs lib/httpx/transcoder/xml.rb in httpx-0.22.0
- old
+ new
@@ -36,11 +36,10 @@
end
begin
require "nokogiri"
- # rubocop:disable Lint/DuplicateMethods
def decode(response)
content_type = response.content_type.mime_type
raise HTTPX::Error, "invalid form mime type (#{content_type})" unless MIME_TYPES.match?(content_type)
@@ -49,9 +48,8 @@
rescue LoadError
def decode(_response)
raise HTTPX::Error, "\"nokogiri\" is required in order to decode XML"
end
end
- # rubocop:enable Lint/DuplicateMethods
end
register "xml", Xml
end