Xml

The :xml plugin adds the ability of encoding nokogiri objects into request payload (via the :xml param), and parsing a response payload into a nokogiri document.

As a consequence, it depends on the nokogiri gem.

How to use

payload =  Nokogiri::XML("<xml....")

http = HTTPX.plugin(:xml)

response = http.post(xml_uri, xml: payload)

response.xml #=> returns a Nokogiri::XML object

Next: Custom Plugins