lib/httpx/plugins/compression/gzip.rb in httpx-0.22.5 vs lib/httpx/plugins/compression/gzip.rb in httpx-0.23.0

- old
+ new

@@ -4,15 +4,17 @@ module HTTPX module Plugins module Compression module GZIP - def self.load_dependencies(*) - require "zlib" - end + class << self + def load_dependencies(*) + require "zlib" + end - def self.configure(klass) - klass.default_options.encodings.register "gzip", self + def extra_options(options) + options.merge(encodings: options.encodings.merge("gzip" => self)) + end end class Deflater def initialize @compressed_chunk = "".b