Public: Converts parsed response bodies to a Hashie::Mash if they were of Hash or Array type.
Public: Parse response bodies as JSON.
Public: Restore marshalled Ruby objects in response bodies.
Public: parses response bodies with MultiXml.
Public: Parse response bodies as YAML.
Warning: this uses `YAML.load()` by default and as such is not safe against code injection or DoS attacks. If you're loading resources from an untrusted host or over HTTP, you should subclass this middleware and redefine it to use `safe_load()` if you're using a Psych version that supports it:
class SafeYaml < FaradayMiddleware::ParseYaml define_parser do |body| YAML.safe_load(body) end end Faraday.new(..) do |config| config.use SafeYaml ... end
Public: Converts parsed response bodies to a Hashie::Rash if they were of Hash or Array type.