Forum: Ruby testing web services

95e2092707d6ee9e7634e169f713cc38?d=identicon&s=25 Jade CKS (kc_123)
on 2014-07-18 06:02
Hi I am trying to test REST services that returns both json and xml
I have something like this, expecting the webservice to return in xml
only. But default payload returned is in json

module WebServiceHelper


  def wsh_get_response(invoice_number)
    @@last_response = HTTParty.get("url....")


  def wsh_view_entire_xml_payload
    xml_doc = Nokogiri::XML(@@last_response.body)
    puts xml_doc

Does anyone know if it can be converted to xml?
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.