Method: HTTPX::Plugins::XML::Transcoder.decode
- Defined in:
- lib/httpx/plugins/xml.rb
.decode(response) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/httpx/plugins/xml.rb', line 38 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) Nokogiri::XML.method(:parse) end |