Module: HTTPX::Plugins::Stream::InstanceMethods
- Defined in:
- lib/httpx/plugins/stream.rb
Instance Method Summary collapse
Instance Method Details
#request(*args, stream: false, **options) ⇒ Object
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/httpx/plugins/stream.rb', line 127 def request(*args, stream: false, **) return super(*args, **) unless stream requests = args.first.is_a?(Request) ? args : build_requests(*args, ) raise Error, "only 1 response at a time is supported for streaming requests" unless requests.size == 1 request = requests.first StreamResponse.new(request, self) end |