Class: HTTP::Features::AutoInflate
Instance Method Summary
collapse
#initialize, #wrap_request
Constructor Details
This class inherits a constructor from HTTP::Feature
Instance Method Details
#stream_for(connection) ⇒ Object
#wrap_response(response) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/http/features/auto_inflate.rb', line 6
def wrap_response(response)
return response unless %w[deflate gzip x-gzip].include?(response.[:content_encoding])
Response.new(
:status => response.status,
:version => response.version,
:headers => response.,
:proxy_headers => response.,
:connection => response.connection,
:body => stream_for(response.connection)
)
end
|