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
126 127 128 129 130 131 132 |
# File 'lib/httpx/plugins/stream.rb', line 126 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 |