module Faraday::Response

Constants

Mashify

Public: Converts parsed response bodies to a Hashie::Mash if they were of Hash or Array type.

ParseJson

Public: Parse response bodies as JSON.

ParseMarshal

Public: Restore marshalled Ruby objects in response bodies.

ParseXml

Public: parses response bodies with MultiXml.

ParseYaml

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
Rashify

Public: Converts parsed response bodies to a Hashie::Rash if they were of Hash or Array type.