Class: HTTP::Features::AutoInflate

Inherits:
HTTP::Feature show all
Defined in:
lib/http/features/auto_inflate.rb

Instance Method Summary collapse

Methods inherited from HTTP::Feature

#initialize

Constructor Details

This class inherits a constructor from HTTP::Feature

Instance Method Details

#stream_for(connection, response) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/http/features/auto_inflate.rb', line 6

def stream_for(connection, response)
  if %w[deflate gzip x-gzip].include?(response.headers[:content_encoding])
    Response::Inflater.new(connection)
  else
    connection
  end
end