Hi I am trying to test REST services that returns both json and xml
payload
I have something like this, expecting the webservice to return in xml
only. But default payload returned is in json
module WebServiceHelper
@@last_response
def wsh_get_response(invoice_number)
@@last_response = HTTParty.get(“url…”)
end
def wsh_view_entire_xml_payload
xml_doc = Nokogiri::XML(@@last_response.body)
puts xml_doc
end
Does anyone know if it can be converted to xml?