Module: HTTPX::Plugins::Compression::RequestMethods

Defined in:
lib/httpx/plugins/compression.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject



43
44
45
46
47
48
49
50
51
# File 'lib/httpx/plugins/compression.rb', line 43

def initialize(*)
  super
  # forego compression in the Range cases
  if @headers.key?("range")
    @headers.delete("accept-encoding")
  else
    @headers["accept-encoding"] ||= @options.encodings.keys
  end
end