Sha256: a2257b191b837b08b9ad71f7c3452ee8268f2c2d41e7f25876f2f08875c68e2b

Contents?: true

Size: 316 Bytes

Versions: 8

Compression:

Stored size: 316 Bytes

Contents

require 'faraday_middleware/response_middleware'

module FaradayMiddleware
  # Public: Parse response bodies as YAML.
  class ParseYaml < ResponseMiddleware
    dependency 'yaml'

    define_parser { |body| ::YAML.load body }
  end
end

# deprecated alias
Faraday::Response::ParseYaml = FaradayMiddleware::ParseYaml

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
faraday_middleware-0.8.7 lib/faraday_middleware/response/parse_yaml.rb
faraday_middleware-0.8.6 lib/faraday_middleware/response/parse_yaml.rb
faraday_middleware-0.8.5 lib/faraday_middleware/response/parse_yaml.rb
agiley-faraday_middleware-0.8.3.2 lib/faraday_middleware/response/parse_yaml.rb
agiley-faraday_middleware-0.8.3.1 lib/faraday_middleware/response/parse_yaml.rb
faraday_middleware-0.8.4 lib/faraday_middleware/response/parse_yaml.rb
agiley-faraday_middleware-0.8.3 lib/faraday_middleware/response/parse_yaml.rb
faraday_middleware-0.8.3 lib/faraday_middleware/response/parse_yaml.rb