Module: HTTPX::Plugins::Stream
- Defined in:
- lib/httpx/plugins/stream.rb
Overview
This plugin adds support for streaming a response (useful for i.e. “text/event-stream” payloads).
Defined Under Namespace
Modules: InstanceMethods, OptionsMethods, RequestMethods, ResponseBodyMethods, ResponseMethods
Constant Summary collapse
- STREAM_REQUEST_OPTIONS =
{ timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 }.freeze }.freeze
Class Method Summary collapse
Class Method Details
.extra_options(options) ⇒ Object
130 131 132 133 134 135 136 |
# File 'lib/httpx/plugins/stream.rb', line 130 def self.() .merge( stream: false, timeout: { read_timeout: Float::INFINITY, operation_timeout: 60 }, stream_response_class: Class.new(StreamResponse, &Options::SET_TEMPORARY_NAME).freeze ) end |