Class: Net::HTTPSuccess

Inherits:
Object
  • Object
show all
Defined in:
lib/extensions/http_success.rb

Instance Method Summary collapse

Instance Method Details

#bodyObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/extensions/http_success.rb', line 7

def body
  case self['content-encoding']
  when 'gzip'
    body = StringIO.new(super)
    uncompressed_body = Zlib::GzipReader.new(body)
    uncompressed_body.read
  else
    super
  end
end