lib/httpx/plugins/stream.rb in httpx-0.24.7 vs lib/httpx/plugins/stream.rb in httpx-1.0.0

- old
+ new

@@ -92,10 +92,14 @@ # This plugin adds support for stream response (text/event-stream). # # https://gitlab.com/honeyryderchuck/httpx/wikis/Stream # module Stream + def self.extra_options(options) + options.merge(timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 }) + end + module InstanceMethods def request(*args, stream: false, **options) return super(*args, **options) unless stream requests = args.first.is_a?(Request) ? args : build_requests(*args, options) @@ -136,15 +140,9 @@ def transition(*) return if @stream super end - end - - def self.const_missing(const_name) - super unless const_name == :StreamResponse - warn "DEPRECATION WARNING: the class #{self}::StreamResponse is deprecated. Use HTTPX::StreamResponse instead." - HTTPX::StreamResponse end end register_plugin :stream, Stream end end