module HTTPX::Plugins::XML::Transcoder

  1. lib/httpx/plugins/xml.rb

Methods

Public Instance

  1. decode
  2. encode

Public Instance methods

decode(response)
[show source]
   # File lib/httpx/plugins/xml.rb
38 def decode(response)
39   content_type = response.content_type.mime_type
40 
41   raise HTTPX::Error, "invalid form mime type (#{content_type})" unless MIME_TYPES.match?(content_type)
42 
43   Nokogiri::XML.method(:parse)
44 end
encode(xml)
[show source]
   # File lib/httpx/plugins/xml.rb
34 def encode(xml)
35   Encoder.new(xml)
36 end