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
103 104 105 106 107 108 109 110 111 112 |
# File 'lib/httpx/plugins/stream.rb', line 103 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 |