Sha256: 9b7f8848e077ece5b5ac56eb9b5dc15c0abba67e48fe3fcb942547235bc474fb

Contents?: true

Size: 355 Bytes

Versions: 8

Compression:

Stored size: 355 Bytes

Contents

require 'faraday_middleware/response_middleware'

module FaradayMiddleware
  # Public: Restore marshalled Ruby objects in response bodies.
  class ParseMarshal < ResponseMiddleware
    define_parser { |body|
      ::Marshal.load body unless body.empty?
    }
  end
end

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

Version data entries

8 entries across 8 versions & 2 rubygems

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