Closed canatella closed 9 years ago
Thanks for this. The XML support is really in beta form at the moment. Are you using it and this is a showstopper for you?
Nope, I worked around it, in case someones needs it:
class Proxy < ActiveRestClient::ProxyBase
get(/./) do
response = passthrough
body = Crack::XML.parse(response.body)
.... do some stuff....
ActiveRestClient::FaradayResponseProxy.new(OpenStruct.new(status:response.status, response_headers:response.headers, body:body))
end
end
Try that commit, if it works I'll release it as a new version.
When using proxy to modify a response in XML, the ProxyBase#translate method tries to parse the XML as JSON.